> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenVLA 

The `OpenVLA` class provides core functionality for this module.

<ResponseField name="class OpenVLA()">
  <ResponseField name="use_local" type="boolean" default="False">
    If True, inference call is run on the local VM, else offloaded onto GRID-Cortex. Defaults to True.
  </ResponseField>
</ResponseField>

<ResponseField name="def run()">
  <ResponseField name="image" type="np.ndarray" required="True">
    The input RGB image of shape $(M,N,3)$.
  </ResponseField>

  <ResponseField name="prompt" type="str" required="True">
    Task instruction.
  </ResponseField>

  <ResponseField name="Returns" type="List[float]">
    Predicted action based on the query and image, represented as a 7-DoF vector.
  </ResponseField>
</ResponseField>

<RequestExample>
  ```python Inference Call theme={null}
  from grid.model.perception.vla.openvla import OpenVLA
  car = AirGenCar()

  # We will be capturing an image from the AirGen simulator 
  # and run model inference on it.

  img =  car.getImage("front_center", "rgb").data

  model = OpenVLA(use_local = True)
  result = model.run(image=img, prompt = "Close the drawer")
  print(result)
  ```
</RequestExample>

<Tabs>
  <Tab title="License">
    This code is licensed under the MIT License.
  </Tab>

  <Tab title="Source">
    [https://github.com/OpenVLA/OpenVLA](https://github.com/OpenVLA/OpenVLA)
  </Tab>
</Tabs>
