Closed allanwakes closed 2 weeks ago
try options
.set_settings("model.AzureOpenAI.options", { "deployment_name": "xxx" })
try options
.set_settings("model.AzureOpenAI.options", { "deployment_name": "xxx" })
I tried with this options, but an exception pops out
Exception: [Agent Request] Error: AsyncCompletions.create() got an unexpected keyword argument 'deployment_name'
I see, I will check and fix this
fixed in https://github.com/Maplemx/Agently/commit/4b97e3180cc35d57e0685eca6b35f58dbac72629
will be published in version 3.3.1.1
how to set:
.set_settings("current_model", "AzureOpenAI")
.set_settings("model.AzureOpenAI.auth", {
"api_key": "xxxxx",
"api_version": "2024-02-01",
"azure_endpoint": "https://xxx.openai.azure.com/",
"azure_deployment": "xxx",
})
please confirm param names by reading Microsoft official document or reading azure python file in OpenAI package:
class AzureOpenAI(BaseAzureClient[httpx.Client, Stream[Any]], OpenAI):
@overload
def __init__(
self,
*,
azure_endpoint: str,
azure_deployment: str | None = None,
api_version: str | None = None,
api_key: str | None = None,
azure_ad_token: str | None = None,
azure_ad_token_provider: AzureADTokenProvider | None = None,
organization: str | None = None,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
max_retries: int = DEFAULT_MAX_RETRIES,
default_headers: Mapping[str, str] | None = None,
default_query: Mapping[str, object] | None = None,
http_client: httpx.Client | None = None,
_strict_response_validation: bool = False,
) -> None:
...
published in version 3.3.1.1
I tried to use Agently with Azure openai, but I found that there is no place to fill in deployment when initializing agent. Take llamaindex for example:
Thanks.