Spaces:
Running
Running
vlff李飞飞
commited on
Commit
·
a7f9822
1
Parent(s):
5b67568
更新oai
Browse files
qwen_agent/llm/qwen_oai.py
CHANGED
@@ -9,11 +9,10 @@ class QwenChatAsOAI(BaseChatModel):
|
|
9 |
|
10 |
def __init__(self, model: str, api_key: str, model_server: str):
|
11 |
super().__init__()
|
12 |
-
|
13 |
if model_server.strip().lower() != 'openai':
|
14 |
openai.api_base = os.getenv('OPENAI_API_BASE', model_server)
|
15 |
openai.api_key = api_key.strip() or os.getenv('OPENAI_API_KEY', 'EMPTY')
|
16 |
-
self.model = model
|
17 |
|
18 |
def _chat_stream(
|
19 |
self,
|
|
|
9 |
|
10 |
def __init__(self, model: str, api_key: str, model_server: str):
|
11 |
super().__init__()
|
|
|
12 |
if model_server.strip().lower() != 'openai':
|
13 |
openai.api_base = os.getenv('OPENAI_API_BASE', model_server)
|
14 |
openai.api_key = api_key.strip() or os.getenv('OPENAI_API_KEY', 'EMPTY')
|
15 |
+
self.model = os.getenv('OPENAI_MODEL_NAME', model)
|
16 |
|
17 |
def _chat_stream(
|
18 |
self,
|