mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-04-29 00:27:09 +08:00
fix: change gpt4 model and claude latest
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
parent
385df6c821
commit
cd2185c7d6
@ -16,7 +16,7 @@ markdown_symbol.link = "🔗" # If you want, Customizing the link symbol
|
||||
CHATGPT_API_KEY = environ.get("OPENAI_API_KEY")
|
||||
CHATGPT_BASE_URL = environ.get("OPENAI_API_BASE") or "https://api.openai.com/v1"
|
||||
CHATGPT_MODEL = "gpt-3.5-turbo"
|
||||
CHATGPT_PRO_MODEL = "gpt-4-turbo"
|
||||
CHATGPT_PRO_MODEL = "gpt-4-turbo-2024-04-09"
|
||||
|
||||
|
||||
client = OpenAI(api_key=CHATGPT_API_KEY, base_url=CHATGPT_BASE_URL, timeout=20)
|
||||
|
@ -117,8 +117,9 @@ def claude_pro_handler(message: Message, bot: TeleBot) -> None:
|
||||
reply_id = bot_reply_first(message, who, bot)
|
||||
|
||||
player_message.append({"role": "user", "content": m})
|
||||
# keep the last 5, every has two ask and answer.
|
||||
if len(player_message) > 10:
|
||||
# keep the last 2, every has two ask and answer.
|
||||
# its too expensive
|
||||
if len(player_message) > 4:
|
||||
player_message = player_message[2:]
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user