Open
Description
Describe the bug
I'm getting a 404 error when attempting to invoke the Azure API
irb(main):001:0> client = OpenAI::Client.new
=> #<OpenAI::Client:25900 @access_token=[REDACTED], @admin_token=[REDACTED], @api_type=:azure, @api_version="2024-08-01-preview", @extra_headers=[REDACTED], @log_er...
irb(main):002:0> client.embeddings(parameters: {model: "text-embedding-3-small", input: "test-input"})
Traceback (most recent call last):
1: from (irb):2
Faraday::ResourceNotFound (the server responded with status 404)
irb(main):003:0> OpenAI::VERSION
=> "7.4.0"
To Reproduce
Steps to reproduce the behavior:
- open rails console
client = OpenAI::Client.new
client.embeddings(parameters: {model: "text-embedding-3-small", input: "test-input"})
Traceback (most recent call last):
1: from (irb):2
Faraday::ResourceNotFound (the server responded with status 404
Expected behavior
No Error
Desktop (please complete the following information):
- OS: Mac OS 15.2
- Ruby: 3.12.7
Additional context
config/intializers/open_ai.rb
OpenAI.configure do |config|
config.access_token = Rails.application.credentials.dig(:azure_open_ai, :api_key_1)
config.uri_base = Rails.application.credentials.dig(:azure_open_ai, :end_point)
config.api_type = :azure
config.api_version = "2024-08-01-preview"
end