AIDotNet / Thor

Thor(雷神托尔) 是一款强大的人工智能模型管理工具,其主要目的是为了实现多种AI模型的统一管理和使用。通过Thor(雷神托尔),用户可以轻松地管理和使用众多AI模型,而且Thor(雷神托尔)兼容OpenAI的接口格式,使得使用更加方便。

Home Page:http://api.token-ai.cn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

实战获取当前时间插件示例,使用Azure的gpt-4o模型,Azure接口报异常。

feynmanloo opened this issue · comments

实战获取当前时间插件示例,使用Azure的gpt-4o模型,Azure接口报异常:
Headers:
x-ms-region: REDACTED
apim-request-id: REDACTED
x-ratelimit-remaining-requests: REDACTED
x-ms-rai-invoked: REDACTED
x-envoy-upstream-service-time: REDACTED
X-Request-ID: REDACTED
ms-azureml-model-error-reason: REDACTED
ms-azureml-model-error-statuscode: REDACTED
ms-azureml-model-time: REDACTED
x-ms-client-request-id: 6b1121d6-d6a8-4662-a481-a43cf6522d31
Strict-Transport-Security: REDACTED
azureml-model-session: REDACTED
X-Content-Type-Options: REDACTED
x-ratelimit-remaining-tokens: REDACTED
Date: Thu, 13 Jun 2024 08:20:41 GMT
Content-Length: 269
Content-Type: application/json

Azure.RequestFailedException: Invalid schema for function 'TimeInformationPlugin-GetCurrentUtcTime': None is not of type 'object', 'boolean'.
Status: 400 (model_error)
ErrorCode: invalid_function_parameters

Content:
{
"error": {
"message": "Invalid schema for function 'TimeInformationPlugin-GetCurrentUtcTime': None is not of type 'object', 'boolean'.",
"type": "invalid_request_error",
"param": "functions[0].parameters",
"code": "invalid_function_parameters"
}
}

备注:使用openai官方提供的gpt-4o是没问题的。跳过代理,直接使用Azure的渠道,也是没问题的。

@239573049 大佬,这个有解吗?

目前已知Azure扩展的版本过低导致bug

对于azure我们使用HttpClient直接请求不在依赖Azure openAI SDK