claude thinking model support

This commit is contained in:
Aleix Conchillo Flaqué
2025-12-01 12:01:56 -08:00
parent 2235d8f5a2
commit 741ec7486d
4 changed files with 89 additions and 0 deletions

View File

@@ -82,6 +82,13 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
llm = AnthropicLLMService(
api_key=os.getenv("ANTHROPIC_API_KEY"),
model="claude-3-7-sonnet-latest",
wait_for_all=True,
params=AnthropicLLMService.InputParams(
max_tokens=16000,
extra={
"thinking": {"type": "enabled", "budget_tokens": 10000},
},
),
)
llm.register_function("get_weather", get_weather)
llm.register_function("get_restaurant_recommendation", fetch_restaurant_recommendation)