PDF attachment support for Claude 3.5 Sonnet, refs #22

This commit is contained in:
Simon Willison
2024-11-01 11:46:38 -07:00
parent e065c6d48c
commit ec3aa1295d
2 changed files with 27 additions and 16 deletions

View File

@@ -43,10 +43,7 @@ EXPECTED_IMAGE_TEXT = (
@pytest.mark.vcr
def test_image_prompt():
model = llm.get_model("claude-3.5-sonnet")
model.key = (
model.key
or "sk-..."
)
model.key = model.key or "sk-..."
response = model.prompt(
"Describe image in three words",
attachments=[llm.Attachment(content=TINY_PNG)],