https://github.com/vaclavsynacek/clj-claude
A minimal wrapper around the Anthropic Claude API
https://github.com/vaclavsynacek/clj-claude
anthropic anthropic-claude aws-bedrock generative-ai
Last synced: 5 months ago
JSON representation
A minimal wrapper around the Anthropic Claude API
- Host: GitHub
- URL: https://github.com/vaclavsynacek/clj-claude
- Owner: VaclavSynacek
- Created: 2024-11-16T13:59:14.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-12-18T20:46:32.000Z (10 months ago)
- Last Synced: 2024-12-18T21:33:55.353Z (10 months ago)
- Topics: anthropic, anthropic-claude, aws-bedrock, generative-ai
- Language: Clojure
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# clj-claude
A minimal wrapper around the Anthropic Claude APIs, intended to be used in scripts (babashka or small clojure programs).
## Design decision:
* minimal
* good for scripting:
* no support for streaming, which just complicates matters in scripts (as opposed to interactive tools where streaming is essential)
* intentionally relies on [babashka.curl](https://github.com/babashka/babashka.curl) rather than http clients for long-lived processes
* should support calling/billing through several providers
* same api as [clj-nova](https://github.com/VaclavSynacek/clj-nova) wrapper
library (where possible)## Feature status
- [ ] ~~streaming response~~
- [X] call through [Anthropic API](https://docs.anthropic.com/en/api/getting-started)
- [ ] call through [AWS Bedrock API](https://aws.amazon.com/bedrock/)
- [ ] [Vision](https://docs.anthropic.com/en/docs/build-with-claude/vision)
- [X] [Tool use](https://docs.anthropic.com/en/docs/build-with-claude/tool-use)
- [ ] [Computer use (beta)](https://docs.anthropic.com/en/docs/build-with-claude/computer-use)
- [X] [Prompt caching (beta)](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching)
- [ ] [Message batches (beta)](https://docs.anthropic.com/en/docs/build-with-claude/message-batches)
- [X] [Token counting (beta)](https://docs.anthropic.com/en/docs/build-with-claude/token-counting)## Usage
See `(comment` block at the end of [clj-claude.scripting](https://github.com/VaclavSynacek/clj-claude/blob/7a38a32b9bae98e5b6aa09cfa2de7b00f112d2ab/src/clj_claude/scripting.clj#L85)