Update default Anthropic model to claude-sonnet-4-6
Update the default model in AnthropicLLMService and remove the now-unnecessary explicit model from the function calling example.
This commit is contained in:
@@ -72,10 +72,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
|||||||
voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady
|
voice_id="71a7ad14-091c-4e8e-a314-022ece01c121", # British Reading Lady
|
||||||
)
|
)
|
||||||
|
|
||||||
llm = AnthropicLLMService(
|
llm = AnthropicLLMService(api_key=os.getenv("ANTHROPIC_API_KEY"))
|
||||||
api_key=os.getenv("ANTHROPIC_API_KEY"),
|
|
||||||
model="claude-3-7-sonnet-latest",
|
|
||||||
)
|
|
||||||
llm.register_function("get_weather", get_weather)
|
llm.register_function("get_weather", get_weather)
|
||||||
llm.register_function("get_restaurant_recommendation", fetch_restaurant_recommendation)
|
llm.register_function("get_restaurant_recommendation", fetch_restaurant_recommendation)
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ class AnthropicLLMService(LLMService):
|
|||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
api_key: str,
|
api_key: str,
|
||||||
model: str = "claude-sonnet-4-5-20250929",
|
model: str = "claude-sonnet-4-6",
|
||||||
params: Optional[InputParams] = None,
|
params: Optional[InputParams] = None,
|
||||||
client=None,
|
client=None,
|
||||||
retry_timeout_secs: Optional[float] = 5.0,
|
retry_timeout_secs: Optional[float] = 5.0,
|
||||||
@@ -195,7 +195,7 @@ class AnthropicLLMService(LLMService):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
api_key: Anthropic API key for authentication.
|
api_key: Anthropic API key for authentication.
|
||||||
model: Model name to use. Defaults to "claude-sonnet-4-5-20250929".
|
model: Model name to use. Defaults to "claude-sonnet-4-6".
|
||||||
params: Optional model parameters for inference.
|
params: Optional model parameters for inference.
|
||||||
client: Optional custom Anthropic client instance.
|
client: Optional custom Anthropic client instance.
|
||||||
retry_timeout_secs: Request timeout in seconds for retry logic.
|
retry_timeout_secs: Request timeout in seconds for retry logic.
|
||||||
|
|||||||
Reference in New Issue
Block a user