Azure OpenAI endopoint 404 Not Found

悠暉 山本 0 Reputation points

I have a trouble. I'm using Lang Chain Model for the purpose of ReAct using AzureOpenAI and BingSearchAPI. But, agent couldn't occur due to 404 Error. If anyone has any information, I would appreciate it if you could let me know. #Error

Exception has occurred: NotFoundError
Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
httpx.HTTPStatusError: Client error '404 Resource Not Found' for url ''
For more information check:

During handling of the above exception, another exception occurred:

  File "C:\Users\****\Desktop\locals\202401\20240123\", line 32, in <module>"日本の総理大臣は?")
openai.NotFoundError: Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}




llm = AzureChatOpenAI(

tools = load_tools(["bing-search"], llm=llm, bing_subscription_key = BING_SUBSCRIPTION_KEY, bing_search_url = BING_SEARCH_URL)
agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True, agent_kwargs=dict(suffix='Answer should be in Japanese.' + prompt.SUFFIX))"What is Tokyo's weather today?")
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
1,814 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sabyasachi Samaddar 160 Reputation points Microsoft Employee

    Hi @**悠暉 山本,**Thanks for contacting the Microsoft QnA forum. From the description of your problem, it seems you are getting 404, aka resource not found error. I can see your base URL for open ai is OPENAI_API_BASE ="" Can you please try without giving "/openai", like OPENAI_API_BASE ="" Please try and let me know if that resolve your issue. If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about the answer, please click "Comment"