You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the DeepSeek model with LitellmModel, it always requires accessing the OpenAI platform:
importasyncioimportosfromagentsimportAgent, Runnerfromagents.extensions.models.litellm_modelimportLitellmModelos.environ["DEEPSEEK_API_KEY"] ="sk-74a*****************f131"asyncdefmain():
model=LitellmModel(model="deepseek/deepseek-chat", api_key=os.environ["DEEPSEEK_API_KEY"])
agent=Agent(
name="Assistant",
instructions="You only respond in haikus.",
model=model,
)
result=awaitRunner.run(agent, "Tell me about recursion in programming.")
print(result.final_output)
if__name__=="__main__":
asyncio.run(main())
This script output these:
[non-fatal] Tracing client error 401: {
"error": {
"message": "Incorrect API key provided: sk-74a47***********************f131. You can find your API key at https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}
Recursion calls self,
Like a loop but with functions,
Base case ends the chain.
[non-fatal] Tracing client error 401: {
"error": {
"message": "Incorrect API key provided: sk-74a47***********************f131. You can find your API key at https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": "invalid_api_key"
}
}
Debug information
Agents SDK version: (v0.0.16)
Python version (3.11)
The text was updated successfully, but these errors were encountered:
When using the DeepSeek model with LitellmModel, it always requires accessing the OpenAI platform:
This script output these:
Debug information
v0.0.16
)3.11
)The text was updated successfully, but these errors were encountered: