Open
Description
Currently in the course notebooks you have hardcoded in a model name that is deprecated resulting in a 404
tool_use\03_structured_outputs.ipynb
response = client.messages.create(
model="claude-3-sonnet-20240629", <----- no longer exists
suggest you implement something aligned to the below, where "sonnet" could be a param in a function (accepting either 'sonnet' or 'haiku' and then return the model.id:
even better would be something in the Anthropic class like Athropic().model.latest.large / Anthropic().model.latest.small or similar to protect against name changes away from 'sonnet' or 'haiku'
models = Anthropic().models.list().data
for model in models:
if "sonnet" in model.id:
print(model.id)
Metadata
Metadata
Assignees
Labels
No labels