Closed ymtdzzz closed 3 hours ago
Hi @ymtdzzz, thank you for the clearly specified issue and apologies for any inconvenience. Would you be able to test if #532 does indeed fix the issue? Thank you.
@alexrudall , thanks for your rapid response!
[3] pry(main)> OpenAI::VERSION
=> "7.3.1"
[4] pry(main)> response = client.embeddings(parameters: {model: "text-embedding-3-small", input: "test-input"})
[5] pry(main)> response.dig("data", 0, "embedding").length
=> 1536
@alexrudall , thanks for your rapid response! #532 seems to fix this issue 👍
[3] pry(main)> OpenAI::VERSION => "7.3.1" [4] pry(main)> response = client.embeddings(parameters: {model: "text-embedding-3-small", input: "test-input"}) [5] pry(main)> response.dig("data", 0, "embedding").length => 1536
Thank you @ymtdzzz, v7.3.1 is now released and contains the fix.
Thanks! This issue is fixed so I close it.
Describe the bug From the version
7.3.0
,Faraday::ResourceNotFound: the server responded with status 404
occurs when calling#embeddings
method to send a request to Azure.To Reproduce Steps to reproduce the behavior:
#embeddings
I have confirmed that it works on the version
7.2.0
Expected behavior No errors occurred
Screenshots N/A
Desktop :
Possible solution Maybe the following change might be the cause:
https://github.com/alexrudall/ruby-openai/pull/527
https://github.com/alexrudall/ruby-openai/blob/a5714d340c254b810abff11d8fdc2e49d703fa14/lib/openai/http.rb#L21-L26
https://github.com/alexrudall/ruby-openai/blob/a5714d340c254b810abff11d8fdc2e49d703fa14/lib/openai/http.rb#L88-L91
If we use Azure,
req.params
already has theapi_key
param. So should we mergequery_params
instead of overwriting ?