Skip to content

Commit 48c08f4

Browse files
committed
unset default timeout
1 parent fceabb8 commit 48c08f4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bot/chatgpt/chat_gpt_bot.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
from bot.bot import Bot
44
from bot.chatgpt.chat_gpt_session import ChatGPTSession
55
from bot.openai.open_ai_image import OpenAIImage
6-
from bot.session_manager import Session, SessionManager
6+
from bot.session_manager import SessionManager
77
from bridge.context import ContextType
88
from bridge.reply import Reply, ReplyType
99
from config import conf, load_config
1010
from common.log import logger
1111
from common.token_bucket import TokenBucket
12-
from common.expired_dict import ExpiredDict
1312
import openai
1413
import openai.error
1514
import time
@@ -91,8 +90,8 @@ def compose_args(self):
9190
"top_p":1,
9291
"frequency_penalty":conf().get('frequency_penalty', 0.0), # [-2,2]之间,该值越大则更倾向于产生不同的内容
9392
"presence_penalty":conf().get('presence_penalty', 0.0), # [-2,2]之间,该值越大则更倾向于产生不同的内容
94-
"request_timeout": conf().get('request_timeout', 60), # 请求超时时间,openai接口默认设置为600,对于难问题一般需要较长时间
95-
"timeout": conf().get('request_timeout', 120), #重试超时时间,在这个时间内,将会自动重试
93+
"request_timeout": conf().get('request_timeout', None), # 请求超时时间,openai接口默认设置为600,对于难问题一般需要较长时间
94+
"timeout": conf().get('request_timeout', None), #重试超时时间,在这个时间内,将会自动重试
9695
}
9796

9897
def reply_text(self, session:ChatGPTSession, session_id, api_key, retry_count=0) -> dict:

0 commit comments

Comments
 (0)