Anthropic unofficial Rust SDK 🦀
anthropic-rs is an unofficial Rust library to interact with Anthropic REST API, with async support.
Wanna play with Claude in Rust? This is the place to be!
Usage
async
You can find full working examples in the examples directory.
Configuration
anthropic-rs uses dotenv to automatically load environment variables from a .env file. You can also set these variables manually in your environment. Here is an example of the configuration variables used:
ANTHROPIC_API_KEY="..."
ANTHROPIC_DEFAULT_MODEL="claude-v1"
Replace the "..." with your actual tokens and preferences.
You can also set these variables manually when you crate a new Client instance, see more details in usage section.
Features
- Completion (
/v1/complete) - Manage stream mode
Contributing
Contributions to anthropic-rs are welcomed! Feel free to submit a pull request or create an issue.
License
anthropic-rs is licensed under the MIT License.
Acknowledgements
- Anthropic API reference for the clear and concise documentation.
- The architecture of the SDK is inspired by async-openai, an asynchronous Rust library developed for OpenAI. We extend our heartfelt gratitude to the creators for their invaluable work. We envisage significant benefits in developing a standardized interface for interaction with various AI GPT providers' APIs. As an example, it would facilitate the development of versatile wrappers that could seamlessly interface with different providers.