Skip to main content
Together retired the source’s meta-llama/Llama-Vision-Free serverless model. Select a current vision model from the Together serverless catalog before running. See Together vision inputs.
image_agent_bytes.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Use the selected vision model

Add import os, then replace Together(id="meta-llama/Llama-Vision-Free") with Together(id=os.environ["TOGETHER_VISION_MODEL_ID"]) in the saved file.
5

Add the sample image

Place a JPEG named sample.jpg in the same directory as image_agent_bytes.py.
6

Run the example

Save the code above as image_agent_bytes.py, then run:
Full source: cookbook/90_models/together/image_agent_bytes.py