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 · May be fixed by #64
Open
1 task done

Use OpenAPI generator from the OpenAI API spec #49

philippzagar opened this issue Mar 14, 2024 · 0 comments · May be fixed by #64
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
@paulhdk paulhdk linked a pull request Dec 16, 2024 that will close this issue
8 tasks
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

Successfully merging a pull request may close this issue.

1 participant