mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-25 05:46:13 +00:00
perf: 优化线程锁相关操作
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import openai
|
||||
|
||||
import config
|
||||
|
||||
inst = None
|
||||
|
||||
|
||||
@@ -22,6 +24,7 @@ class OpenAIInteract:
|
||||
response = openai.Completion.create(
|
||||
prompt=prompt,
|
||||
stop=stop,
|
||||
timeout=config.process_message_timeout,
|
||||
**self.api_params
|
||||
)
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user