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
Autogenstudio in with Azure OpenAI model is tested successfully. Also, didn't see this error with older version of Pyautogen and autogenstudio. Started seeing this error when versions are upgraded to the latest versions.
Traceback
Traceback (most recent call last):
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogenstudio\web\app.py", line 70, in add_message
response_message: Message = chatmanager.chat(
^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogenstudio\chatmanager.py", line 29, in chat
flow.run(message=f"{message_text}", clear_history=False)
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogenstudio\workflowmanager.py", line 219, in run
self.sender.initiate_chat(
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 816, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 516, in send
recipient.receive(message, self, request_reply, silent)
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 691, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 1646, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\groupchat.py", line 547, in run_chat
speaker = groupchat.select_speaker(speaker, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\groupchat.py", line 383, in select_speaker
final, name = selector.generate_oai_reply(messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 1064, in generate_oai_reply
extracted_response = self._generate_oai_reply_from_client(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 1083, in _generate_oai_reply_from_client
response = llm_client.create(
^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\oai\client.py", line 624, in create
response = client.create(params)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\oai\client.py", line 278, in create
response = completions.create(**params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_utils_utils.py", line 271, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai\resources\chat\completions.py", line 659, in create
return self._post(
^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_base_client.py", line 1200, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_base_client.py", line 889, in request
return self._request(
^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_base_client.py", line 980, in _request
raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'statusCode': 401, 'message': 'Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.'}
Steps to reproduce
No response
Expected Behavior
oai should take Azure OpenAI credentials. Testing of model worked successfully.
Screenshots and logs
No response
Additional Information
Current versions:
autogenstudio=0.0.44a0=pypi_0
pyautogen=0.2.14=pypi_0
The text was updated successfully, but these errors were encountered:
If you have made any changes to your model, you will need to remove the previous version of the model from your agents and add the new model in your workflows.
If you have made any changes to your model, you will need to remove the previous version of the model from your agents and add the new model in your workflows.
Hi, no changes to the model have been made. All I did is update the pyautogen and autogenstudio libraries.
Describe the bug
Autogenstudio in with Azure OpenAI model is tested successfully. Also, didn't see this error with older version of Pyautogen and autogenstudio. Started seeing this error when versions are upgraded to the latest versions.
Traceback
Traceback (most recent call last):
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogenstudio\web\app.py", line 70, in add_message
response_message: Message = chatmanager.chat(
^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogenstudio\chatmanager.py", line 29, in chat
flow.run(message=f"{message_text}", clear_history=False)
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogenstudio\workflowmanager.py", line 219, in run
self.sender.initiate_chat(
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 816, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 516, in send
recipient.receive(message, self, request_reply, silent)
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 691, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 1646, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\groupchat.py", line 547, in run_chat
speaker = groupchat.select_speaker(speaker, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\groupchat.py", line 383, in select_speaker
final, name = selector.generate_oai_reply(messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 1064, in generate_oai_reply
extracted_response = self._generate_oai_reply_from_client(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\agentchat\conversable_agent.py", line 1083, in _generate_oai_reply_from_client
response = llm_client.create(
^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\oai\client.py", line 624, in create
response = client.create(params)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\autogen\oai\client.py", line 278, in create
response = completions.create(**params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_utils_utils.py", line 271, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai\resources\chat\completions.py", line 659, in create
return self._post(
^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_base_client.py", line 1200, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_base_client.py", line 889, in request
return self._request(
^^^^^^^^^^^^^^
File "C:\Users\dingarea\AppData\Local\anaconda3\envs\autogenenv\Lib\site-packages\openai_base_client.py", line 980, in _request
raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'statusCode': 401, 'message': 'Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.'}
Steps to reproduce
No response
Expected Behavior
oai should take Azure OpenAI credentials. Testing of model worked successfully.
Screenshots and logs
No response
Additional Information
Current versions:
autogenstudio=0.0.44a0=pypi_0
pyautogen=0.2.14=pypi_0
The text was updated successfully, but these errors were encountered: