VRSEN / agency-swarm

The only reliable agent framework built on top of the latest OpenAI Assistants API.
https://vrsen.github.io/agency-swarm/
MIT License
2.05k stars 537 forks source link

Problem with Azure OpenAI #109

Closed Chmurexxx closed 1 month ago

Chmurexxx commented 2 months ago

Executing code: from agency_swarm import Agency

agency = Agency([ceo, [ceo, agent1]])

I got this error:

`--------------------------------------------------------------------------- BadRequestError Traceback (most recent call last) in <cell line: 3>() 1 from agency_swarm import Agency 2 ----> 3 agency = Agency([ceo, [ceo, agent1]])

6 frames /usr/local/lib/python3.10/dist-packages/openai/_base_client.py in _request(self, cast_to, options, remaining_retries, stream, stream_cls) 986 987 log.debug("Re-raising status error") --> 988 raise self._make_status_error_from_response(err.response) from None 989 990 return self._process_response(

BadRequestError: Error code: 400 - {'error': {'type': 'invalid_request_error', 'param': 'model', 'code': 'model_not_found'}}`

There should be some specific model deployments on my Azure OpenAI service? Thanks for help

VRSEN commented 2 months ago

Yes, you need to first create a deployment on Azure OpenAI Studio for a specific model, and then enter deployment name when intializing your agents for model parameter.

Docs: https://vrsen.github.io/agency-swarm/advanced-usage/azure-openai/