alexrudall / ruby-openai

OpenAI API + Ruby! 🤖❤️ NEW: Assistant Vector Stores
MIT License
2.61k stars 302 forks source link

Enhance flexibility by supporting deployment_id for Azure OpenAI model switching #448

Open ZhenhangTung opened 3 months ago

ZhenhangTung commented 3 months ago

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.