mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-25 19:39:35 +00:00
fix: proxy by openai side
This commit is contained in:
parent
3e52803704
commit
77072df371
@ -20,6 +20,8 @@ def chatgpt_generate_stream(
|
|||||||
print(f"Model: {model}, model_params: {model_params}")
|
print(f"Model: {model}, model_params: {model_params}")
|
||||||
|
|
||||||
proxy_api_key = model_params.proxy_api_key
|
proxy_api_key = model_params.proxy_api_key
|
||||||
|
if model_params.http_proxy:
|
||||||
|
openai.proxy = model_params.http_proxy
|
||||||
openai.api_key = os.getenv("OPENAI_API_KEY") or proxy_api_key
|
openai.api_key = os.getenv("OPENAI_API_KEY") or proxy_api_key
|
||||||
proxyllm_backend = model_params.proxyllm_backend
|
proxyllm_backend = model_params.proxyllm_backend
|
||||||
if not proxyllm_backend:
|
if not proxyllm_backend:
|
||||||
|
Loading…
Reference in New Issue
Block a user