Skip to content

refactor: openai-clone providers #271

Open
@0xMochan

Description

@0xMochan
  • 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions