perf: 优化线程锁相关操作

This commit is contained in:
Rock Chin
2022-12-13 16:04:51 +08:00
parent 00abab8050
commit b70a2da2ef
3 changed files with 12 additions and 5 deletions

View File

@@ -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