Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure Azure OpenAI key and base_url with env #1424

Open
XiaozhiAGI opened this issue Nov 5, 2024 · 1 comment
Open

How to configure Azure OpenAI key and base_url with env #1424

XiaozhiAGI opened this issue Nov 5, 2024 · 1 comment

Comments

@XiaozhiAGI
Copy link

🚀 The feature

error message:
PS E:\users\xxx\Desktop\xxx_code> cd .\study\llm\pandas-ai-main
PS E:\users\xxx\Desktop\xxx_code\study\llm\pandas-ai-main> docker-compose build
Failed to load E:\users\xxx\Desktop\xxx_code\study\llm\pandas-ai-main\server.env: open E:\users\xxx\Desktop\xxx_code\study\llm\pandas-ai-main\server.env: The system cannot find the file specified.

I want to use a locally deployed vllm openai interface for a large model. How to configure it in the. env file?

Motivation, pitch

I want to use a locally deployed vllm openai interface for a large model. How to configure it in the. env file?

Alternatives

No response

Additional context

No response

Copy link

dosubot bot commented Nov 5, 2024

To configure the Azure OpenAI key and base_url in the .env file for a locally deployed vllm OpenAI interface, you need to set the following environment variables:

AZURE_OPENAI_API_KEY=<your_azure_openai_api_key>
AZURE_OPENAI_ENDPOINT=<https://YOUR_RESOURCE_NAME.openai.azure.com/>
OPENAI_API_VERSION=<your_api_version>

These variables correspond to the api_token, azure_endpoint, and api_version parameters in the AzureOpenAI class [1][2].

Regarding the error message about the missing .env file, ensure that the .env file is present in the server directory. If it's missing, you can create it by copying the .env.example file provided in the repository:

  1. Navigate to the root directory of the cloned PandasAI repository:

    cd pandas-ai
  2. Copy the .env.example file to .env in the server directory:

    cp server/.env.example server/.env
  3. Edit the server/.env file to update the necessary environment variables, including your Azure OpenAI configuration [3].

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant