SwiftOpenAI v4.1.1
Update Read me for Anthropic OpenAI compatibility
Anthropic
Anthropic provides OpenAI compatibility, for more, visit the documentation
To use Claude models with SwiftOpenAI
you can.
let anthropicApiKey = ""
let openAIService = OpenAIServiceFactory.service(apiKey: anthropicApiKey,
overrideBaseURL: "https://api.anthropic.com",
overrideVersion: "v1")
Now you can create the completio parameters like this:
let parameters = ChatCompletionParameters(
messages: [.init(
role: .user,
content: "Are you Claude?")],
model: .custom("claude-3-7-sonnet-20250219"))
What else
- Allow custom speech model by @hoaknoppix in #138
- Fix for Doubao API by ByteDance by @flexih in #133
New Contributors
- @hoaknoppix made their first contribution in #138
- @flexih made their first contribution in #133
Full Changelog: v4.1.0...v4.1.1