Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF Beta support #10

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Conversation

DavidSnoble
Copy link
Contributor

This Pull Request includes support to pdf uploads to anthropic

To test this you can run something like this

pdf = File.read!("example.pdf") |> Base.encode64()

client = Anthropix.init(System.get_env("ANTHROPIC_API_KEY"))

messages = [%{role: "user", content: [%{type: "document", source: %{type: "base64", media_type: "application/pdf", data: pdf }}]}, %{role: "user", content: "What is this document?"}]
Anthropix.chat(client, messages: messages, model: "claude-3-5-sonnet-20241022")

@lebrunel lebrunel merged commit c416224 into lebrunel:main Nov 20, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants