Skip to main content
Together retired the source’s meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo serverless model. Select a current chat model from the Together serverless catalog before running. See Together deprecations.
basic.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Use the selected chat model

Add import os, then replace Together(id="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo") with Together(id=os.environ["TOGETHER_CHAT_MODEL_ID"]) in the saved file.
5

Run the example

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