cai
cai copied to clipboard
[non-fatal] Tracing client error 403: {"error":{"code":"unsupported_country_region_territory","message":"Country, region, or territory not supported","param":null,"type":"request_forbidden"}}
Hello, I am a user in Hong Kong. Due to OpenAI's regional restrictions, I cannot access OpenAI. Even if I use DeepSeek LLM, the program still gives me a 403 error. I checked and found that it is because the program accesses the URL https://api.openai.com/v1/traces/ingest. What should I do to use the program normally? my code belike `async def main(): agent = Agent( name="Assistant", instructions="You only respond in haikus.", model=OpenAIChatCompletionsModel( model="deepseek-chat", openai_client=AsyncOpenAI(base_url="https://api.deepseek.com/v1", api_key="sk-1ee7e"), ) )
result = await Runner.run(agent, "Tell me about recursion in programming.",run_config=RunConfig(model_provider=OpenAIProvider(base_url="https://api.deepseek.com/v1", api_key="sk-1ee7eb2c0632")))
print(result.final_output)
# Function calls itself,
# Looping in smaller pieces,
# Endless by design.
if name == "main": asyncio.run(main())`
Hello, I am a user in Hong Kong. Due to OpenAI's regional restrictions, I cannot access OpenAI. Even if I use DeepSeek LLM, the program still gives me a 403 error. I checked and found that it is because the program accesses the URL https://api.openai.com/v1/traces/ingest. What should I do to use the program normally? my code belike `async def main(): agent = Agent( name="Assistant", instructions="You only respond in haikus.", model=OpenAIChatCompletionsModel( model="deepseek-chat", openai_client=AsyncOpenAI(base_url="https://api.deepseek.com/v1", api_key="sk-1ee7e"), ) )
result = await Runner.run(agent, "Tell me about recursion in programming.",run_config=RunConfig(model_provider=OpenAIProvider(base_url="https://api.deepseek.com/v1", api_key="sk-1ee7eb2c0632"))) print(result.final_output) # Function calls itself, # Looping in smaller pieces, # Endless by design.if name == "main": asyncio.run(main())`
try to use deepseek/deepseek-chat model name
Hello @oc4anya wondering if you were able to try what @luijait recommended ? Let us know. Thanks
I have solved this problem. I need to set OLLAMA to true in .env。thanks!