Open nazkhan-8451 opened 3 months ago
The following worked for me.
csv_tool = CSVSearchTool(
config=dict(
llm=dict(
provider="azure_openai", # or google, openai, anthropic, llama2, ...
config=dict(
model="gpt-4-32k",
deployment_name="gpt-4-32k"
),
),
embedder=dict(
provider="azure_openai", # or openai, ollama, ...
config=dict(
model="text-embedding-3-large",
deployment_name="text-embedding-3-large"
),
),
),
csv='./process_conn_incr_1000.csv'
)
But assuming you have Azure OpenAI env var setup correctly as well as in the Azure Portal.
os.environ["AZURE_OPENAI_API_KEY"] = os.environ.get("AZURE_OPENAI_API_KEY")
os.environ["AZURE_OPENAI_ENDPOINT"] = os.environ.get("AZURE_OPENAI_ENDPOINT")
os.environ["AZURE_OPENAI_API_VERSION"] = "2024-02-01"
os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"] = "gpt-4-32k"
The following worked for me.
csv_tool = CSVSearchTool( config=dict( llm=dict( provider="azure_openai", # or google, openai, anthropic, llama2, ... config=dict( model="gpt-4-32k", deployment_name="gpt-4-32k" ), ), embedder=dict( provider="azure_openai", # or openai, ollama, ... config=dict( model="text-embedding-3-large", deployment_name="text-embedding-3-large" ), ), ), csv='./process_conn_incr_1000.csv' )
But assuming you have Azure OpenAI env var setup correctly as well as in the Azure Portal.
os.environ["AZURE_OPENAI_API_KEY"] = os.environ.get("AZURE_OPENAI_API_KEY") os.environ["AZURE_OPENAI_ENDPOINT"] = os.environ.get("AZURE_OPENAI_ENDPOINT") os.environ["AZURE_OPENAI_API_VERSION"] = "2024-02-01" os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"] = "gpt-4-32k"
Can you give more details on this setup?
If I want to use the following tool with Azure OpenAI, what would be config values? Please add detail example as it's not clear from the following code. I have GPT4 deployment in Azure named
gpt4-128k
and text embedding deployment namedembedding-ada-002