Closed jmoleiroamc closed 3 months ago
I found out the problem, and it's in the client URL. I created the client like this
$open_ai = OpenAI::factory()
->withBaseUri($azure_endpoint)
->withHttpHeader('api-key', $azure_openai_api_key)
->withQueryParam('api-version', $azure_openai_api_version)
->make();
But for using with custom data, the url is slightly different. Instead of /deployments/{my_deployment}/chat/completions
, in this case I need to use /deployments/{my_deployment}/extensions/chat/completions
(note the added /extensions
)
$open_ai = OpenAI::factory()
->withBaseUri($azure_endpoint."/extensions")
->withHttpHeader('api-key', $azure_openai_api_key)
->withQueryParam('api-version', $azure_openai_api_version)
->make();
With this change I get a data validation error from the API, but that's on my end.
So, if you get the error Unrecognized request arguments supplied
, double check the service url.
I hope this help someone with this problem.
Regards
J
Hi!
I'm trying to use a Chat with custom Data on Azure. The documentation, says that I must add the
dataSource
parameter to the options when I create a chat. This is the sample JSONThis is how I add the option
But Ii get an exception:
The problem only happens when I try to use this feature. Any idea?
Regards
J