Canner / WrenAI

🚀 Open-source SQL AI Agent for Text-to-SQL. Make Text2SQL Easy! 🙌
https://getwren.ai/oss
GNU Affero General Public License v3.0
1.73k stars 155 forks source link

azure openai provider implementation #390

Closed yb-sid closed 3 months ago

yb-sid commented 3 months ago

Untested : Discussion WIP

yb-sid commented 3 months ago

@cyyeh , I'm guessing you haven't used Azure Openai Service. My Company has multiple instances of Azure Openai and each instance is shared by multiple teams.

Under each instance one model of chat is deployed and one model for embedding is deployed. Having Different API_BASE and API_TOKEN allows for better tracking of costs and usage. It also helps in tracing issues in applications as sometimes azure has outages in different regions for different model type.

yb-sid commented 3 months ago

https://github.com/Canner/WrenAI/blob/30746c005e80950afa8572dbd3dc8fd9b7184a4b/wren-ai-service/src/providers/document_store/qdrant.py#L202

I had to change this to 1536 for my changes to work as I do not have access to text-embedding-3-large model.

Also I had to change the make commands in demo folder's makefile as per our discussion in discord

cyyeh commented 3 months ago

https://github.com/Canner/WrenAI/blob/30746c005e80950afa8572dbd3dc8fd9b7184a4b/wren-ai-service/src/providers/document_store/qdrant.py#L202

I had to change this to 1536 for my changes to work as I do not have access to text-embedding-3-large model.

Also I had to change the make commands in demo folder's makefile as per our discussion in discord

@yb-sid these changes should be reflected in this PR: https://github.com/Canner/WrenAI/pull/376

we'll merge this PR soon

cyyeh commented 3 months ago

@cyyeh , I'm guessing you haven't used Azure Openai Service. My Company has multiple instances of Azure Openai and each instance is shared by multiple teams.

Under each instance one model of chat is deployed and one model for embedding is deployed. Having Different API_BASE and API_TOKEN allows for better tracking of costs and usage. It also helps in tracing issues in applications as sometimes azure has outages in different regions for different model type.

thanks for sharing ;)