Skip to main content
Run Fireworks’ current GPT OSS 120B model with synchronous, asynchronous, and streaming agent responses.
This example uses a Llama 3.1 405B model that requires an on-demand deployment. Replace it with the serverless accounts/fireworks/models/gpt-oss-120b model before running. See Fireworks GPT OSS 120B.
basic.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your Fireworks API key

4

Use the current Fireworks model

Replace accounts/fireworks/models/llama-v3p1-405b-instruct with accounts/fireworks/models/gpt-oss-120b in the saved file.
5

Run the example

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