Quickstart
Using the Python SDK
The following is a basic example to get started with the Python SDK.Structuring outputs
In the above example, we’re trying to perform a simple classification task. In such cases, we may want structured outputs. We can accomplish this by passing in a pydantic model or JSON schema to guide the LLM to output the correct format using theoutput_schema
parameter.
Using Files
You can also use files to pass in data. We currently support CSV, Parquet, and TXT files. If you’re using a TXT file, each line should represent a single input. If you’re using a CSV or Parquet file, you must specify the column name that contains the inputs using thecolumn
parameter.
../sdk_and_cli_reference/python-sdk
.
Moving to Production
So far we’ve shown what it looks like to use prototyping jobs (priority 0, default). After working with a small amount of data using prototyping jobs, you’ll likely want to move to production jobs (priority 1) which are less expensive and have higher quotas. To do so, you simply need to set thejob_priority
parameter to 1:
Using the CLI to view job progress and results
Once you’ve submitted jobs via the SDK or API, you can use the CLI to view the status of the job and retrieve the results. Viewing current and past jobs:../sdk_and_cli_reference/cli
.