I’m excited to share AnthropicSwiftSDK, a new Swift client that simplifies the integration of the Anthropic API (Claude) into Swift applications. If you’re building apps for macOS, iOS, or any Swift-based environment and want to harness the power of Claude for AI-driven tasks, this SDK is for you!
Key Features
- Messages API Support: Handle both single queries and multi-turn conversations with Claude.
- Streaming Support: Stream model responses using server-sent events (SSE) for dynamic and responsive interactions.
- Tool Use API: Seamlessly integrate external tools and functions with Claude’s built-in capabilities, utilizing the @FunctionCalling macro for custom tasks.
- AWS Bedrock & Google Vertex AI Support: Easily extend to cloud platforms with Bedrock and Vertex AI support packages.
Why another SDK?
While there are existing Anthropic API clients, AnthropicSwiftSDK is designed specifically for Swift developers, taking full advantage of Swift’s features like async/await and seamless integration with macOS/iOS ecosystems. It’s lightweight, easy to integrate, and focused on performance.
Contributions Welcome!
The SDK currently supports the Messages API, and contributions are welcome for expanding functionality, including legacy Text Completion support or any other feature you’d love to see.