使用 Azure 运行
示例:Azure OpenAI 配置
如果您使用的不是 OpenAI 的模型,而是其他模型提供商,那么除了上述通用配置外,还需要额外的环境变量。
以下是一个 Azure OpenAI 配置的示例
OPENAI_API_VERSION="2024-05-01-preview" # or whatever you are using
AZURE_OPENAI_ENDPOINT="https://CHANGEMEN.openai.azure.com/" # change to the name of your deployment
AZURE_OPENAI_API_KEY="[Your Key]" # change to your API key
EMBEDDING="azure_openai:text-embedding-ada-002" # change to the deployment of your embedding model
FAST_LLM="azure_openai:gpt-4o-mini" # change to the name of your deployment (not model-name)
FAST_TOKEN_LIMIT=4000
SMART_LLM="azure_openai:gpt-4o" # change to the name of your deployment (not model-name)
SMART_TOKEN_LIMIT=4000
RETRIEVER="bing" # if you are using Bing as your search engine (which is likely if you use Azure)
BING_API_KEY="[Your Key]"
有关每个变量作用的更多详细信息,您可以查看 GPTR 配置文档