mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-26 16:53:36 +08:00
fix: os.environ['OPENAI_API_KEY'] exception when no environment variable set
This commit is contained in:
parent
70c6870776
commit
8b1cf7effd
@ -70,7 +70,7 @@ llm_model_dict = {
|
||||
"openai-chatgpt-3.5": {
|
||||
"local_model_path": "gpt-3.5-turbo",
|
||||
"api_base_url": "https://api.openapi.com/v1",
|
||||
"api_key": os.environ["OPENAI_API_KEY"]
|
||||
"api_key": os.environ.get("OPENAI_API_KEY")
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user