修正错误的逻辑
This commit is contained in:
@@ -176,7 +176,7 @@ class OpenAiLLM:
|
||||
kwargs.update(extra_kwargs)
|
||||
if "timeout" not in self._kwargs:
|
||||
timeout = httpx.Timeout(300.0)
|
||||
self._kwargs["timeout"] = timeout
|
||||
kwargs["timeout"] = timeout
|
||||
|
||||
if api_key is None:
|
||||
api_key = APIKeyManager.get_api_key()
|
||||
@@ -188,7 +188,7 @@ class OpenAiLLM:
|
||||
completion = client.chat.completions.create(
|
||||
model=self._model,
|
||||
messages=[{'role': 'user', 'content': user_prompt}],
|
||||
**self._kwargs
|
||||
**kwargs
|
||||
)
|
||||
return completion.choices[0].message
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user