Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OpenAPI generator from the OpenAI API spec #49

Open
1 task done
philippzagar opened this issue Mar 14, 2024 · 0 comments
Open
1 task done

Use OpenAPI generator from the OpenAI API spec #49

philippzagar opened this issue Mar 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@philippzagar
Copy link
Member

Use Case

Up-to-date, maintainable and properly versioned OpenAI API library for Swift that is utilized by SpeziLLM

Problem

As of now, we're using the OpenAI package from MacPaw for SpeziLLM: https://github.com/MacPaw/OpenAI
This package definitely is useable, however, it doesn't include the most up-to-date functionality of the OpenAI API, the code is sadly poorly maintained with little to no documentation, and there are lots of inefficiencies throughout the codebase.

Solution

We use the official OpenAPI spec from OpenAI together with the https://github.com/apple/swift-openapi-generator to generate the Swift client-code for the OpenAI API.
One needs to build proper wrappers on top of the generated code pieces, but it is definitely a good start.

Alternatives considered

Using other OpenAI API Swift packages like: https://github.com/OpenDive/OpenAIKit or https://github.com/adamrushy/OpenAISwift or https://github.com/SwiftBeta/SwiftOpenAI
Sadly, most of the packages suffer from similar problems as the MacPaw OpenAI library, as described above.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@philippzagar philippzagar added the enhancement New feature or request label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant