mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-09-04 00:27:14 +00:00
Update anthropicmsgs.py
This commit is contained in:
@@ -50,6 +50,12 @@ class AnthropicMessages(requester.LLMAPIRequester):
|
|||||||
args = self.ap.provider_cfg.data['requester']['anthropic-messages']['args'].copy()
|
args = self.ap.provider_cfg.data['requester']['anthropic-messages']['args'].copy()
|
||||||
args["model"] = model.name if model.model_name is None else model.model_name
|
args["model"] = model.name if model.model_name is None else model.model_name
|
||||||
|
|
||||||
|
if model.thinking:
|
||||||
|
if args["max_tokens"] >= 20000:
|
||||||
|
args["thinking"] = {"type": "enabled", "budget_tokens": 16000}
|
||||||
|
elif args["max_tokens"] > 1:
|
||||||
|
args["thinking"] = {"type": "enabled", "budget_tokens": args["max_tokens"]-1}
|
||||||
|
|
||||||
# 处理消息
|
# 处理消息
|
||||||
|
|
||||||
# system
|
# system
|
||||||
|
|||||||
Reference in New Issue
Block a user