Skip to content

Releases: jamesrochabrun/SwiftOpenAI

SwiftOpenAI v.3.9.6

03 Jan 22:18
Compare
Choose a tag to compare

What's Changed

Predicted outputs support:

Usage:

let code = """
      ScrollView {
         VStack {
            textArea
            Text(chatProvider.errorMessage)
               .foregroundColor(.red)
            streamedChatResultView
         }
      }
"""

let content: ChatCompletionParameters.Message.ContentType = .text("Change this Scrollview to be a list" )
let parameters = ChatCompletionParameters(
     messages: [
         .init(role: .user, content: content),
         .init(role: .user, content: .text(code))], 
     model: .gpt4o,
     prediction: .init(content: .text(code)))
try await openAIService.startChat(parameters: parameters)

Other:

New Contributors

Full Changelog: v3.9.5...v.3.9.6

SwiftOpenAI v3.9.5

28 Dec 08:14
25c73a4
Compare
Choose a tag to compare

What's Changed

Added reasoning_effort parameter for o1 models.
Added metadata for Chat Completions.
Model updates.

Full Changelog: v3.9.4...v3.9.5

SwiftOpenAI v3.9.4

28 Dec 07:16
649a8f2
Compare
Choose a tag to compare

What's Changed

  • Message Content - added image url response type by @ebohdas in #103

New Contributors

Full Changelog: v3.9.3...v3.9.4

SwiftOpenAI v3.9.3

17 Nov 06:00
c1be624
Compare
Choose a tag to compare

Support for additional parameters, users now can use open router.

let service = OpenAIServiceFactory.service(
              apikey:  "${OPENROUTER_API_KEY}",  
             baseURL: "https://openrouter.ai",
             proxyPath: "api"
             headers: ["HTTP-Referer":  "${YOUR_SITE_URL}",  "X-Title":  "${YOUR_SITE_NAME}")

What's Changed

Full Changelog: v3.9.2...v3.9.3

SwiftOpenAI v3.9.2

12 Nov 19:17
c3a04bb
Compare
Choose a tag to compare

Gemini

Screenshot 2024-11-12 at 10 53 43 AM

Gemini is now accessible from the OpenAI Library. Announcement .
SwiftOpenAI support all OpenAI endpoints, however Please refer to Gemini documentation to understand which API's are currently compatible'

Gemini is now accessible through the OpenAI Library. See the announcement here.
SwiftOpenAI supports all OpenAI endpoints. However, please refer to the Gemini documentation to understand which APIs are currently compatible."

You can instantiate a OpenAIService using your Gemini token like this...

let geminiAPIKey = "your_api_key"
let baseURL = "https://generativelanguage.googleapis.com"
let version = "v1beta"

let service = OpenAIServiceFactory.service(
   apiKey: apiKey, 
   overrideBaseURL: baseURL, 
   overrideVersion: version)

You can now create a chat request using the .custom model parameter and pass the model name as a string.

let parameters = ChatCompletionParameters(
      messages: [.init(
      role: .user,
      content: content)],
      model: .custom("gemini-1.5-flash"))

let stream = try await service.startStreamedChat(parameters: parameters)

SwiftOpenAI v3.9.1

28 Oct 06:42
Compare
Choose a tag to compare

SwiftOpenAI v3.9.0

18 Oct 21:45
2b6f26c
Compare
Choose a tag to compare
  • Added store parameters for new Evals framework
  • Added support for Chat Completions Audio generation.
Screenshot 2024-10-18 at 2 45 08 PM

What's Changed

Full Changelog: v3.8.2...v3.9.0

SwiftOpenAI v3.8.2

12 Oct 06:53
2e74797
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.8.1...v3.8.2

SwiftOpenAI v3.8.1

28 Sep 05:42
bc84564
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.8.0...v3.8.1

SwiftOpenAI v3.8.0

12 Sep 18:37
Compare
Choose a tag to compare
Screenshot 2024-09-12 at 11 36 00 AM

Adding 01 models to Models list.

⚠️ Important :

Screenshot 2024-09-12 at 11 36 35 AM

Other:

Fixes #84