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

refactor: openai-clone providers #271

Open
1 of 3 tasks
0xMochan opened this issue Feb 5, 2025 · 0 comments
Open
1 of 3 tasks

refactor: openai-clone providers #271

0xMochan opened this issue Feb 5, 2025 · 0 comments
Labels

Comments

@0xMochan
Copy link
Contributor

0xMochan commented Feb 5, 2025

  • I have looked for existing issues (including closed) about this

Feature Request

  • Split up openai into multiple modules
  • Refactor openai to make reuse much simpler and easier for alternative clients

Motivation

  • Some providers such as openai have grown fairly complex and should be split up into multiple files.
  • Other providers which are based on openai have varying amount of code duplication which leads to bug duplication with replicating fixes and improvements, esp. to openai.

Note

  • Perhaps openai can have provider traits?
  • Reusing Message is usually the easiest amongst the openai compatible
  • Reusing CompletionRequest is the best but unreasonable for those who have excess data
    • Perhaps, #[serde(flatten)] can be used for superset?
  • The base completion implementation needs to refer to some standard parsing structure for atleast the message handling
    • Helper method in openai module?
  • Consider multiple PRs: 1 for splitting up openai, another for each provider!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants