You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, the Azure OpenAI SDK requires setting a full deployment URI, which makes switching models for different tasks cumbersome and affects cost efficiency, especially when using more expensive models like ChatGPT-4 only for complex tasks.
Describe the solution you'd like
I suggest allowing deployment_id specification when initializing a new client, similar to other SDKs. This would enable easy model switching, improving flexibility and cost management.
Describe alternatives you've considered
An alternative is overwriting the uri_base during client setup, but it's less convenient than simply changing a deployment_id.
Additional context
This feature is important for applications that need different models for efficiency and cost-effectiveness, and for developers experimenting with multiple models.
I am very keen on seeing this feature implemented and am willing to offer my help and support in making it happen. If needed, I can contribute to development, testing, or documentation.
The text was updated successfully, but these errors were encountered:
ZhenhangTung
changed the title
Enhance Flexibility by Supporting deployment_id for Azure OpenAI Model Switching
Enhance flexibility by supporting deployment_id for Azure OpenAI model switching
Mar 29, 2024
you can monkeypath this easily
module OpenAI
class Client
def self.azure_deployment(model_name,is_azure)
# I use encrypted credentials store to fetch the correct uri base
uri_base = ... lookup your base id
OpenAI::Client.new(uri_base: isAzure ? uri_base + "openai/deployments/#{model_name}" : nil)
end
end
end
Is your feature request related to a problem? Please describe.
Currently, the Azure OpenAI SDK requires setting a full deployment URI, which makes switching models for different tasks cumbersome and affects cost efficiency, especially when using more expensive models like ChatGPT-4 only for complex tasks.
Describe the solution you'd like
I suggest allowing deployment_id specification when initializing a new client, similar to other SDKs. This would enable easy model switching, improving flexibility and cost management.
Describe alternatives you've considered
An alternative is overwriting the uri_base during client setup, but it's less convenient than simply changing a deployment_id.
Additional context
This feature is important for applications that need different models for efficiency and cost-effectiveness, and for developers experimenting with multiple models.
I am very keen on seeing this feature implemented and am willing to offer my help and support in making it happen. If needed, I can contribute to development, testing, or documentation.
The text was updated successfully, but these errors were encountered: