Skip to content

OpenAI API compatibility for all providers #71

@kisamoto

Description

@kisamoto

Currently this API purely acts a proxy so anybody willing to integrate with different providers needs to also implement an SDK for each provider in their code (my use case).

A huge appealing factor would be if we could use only the OpenAI SDK and purely by changing the URLs when initializing a new client get access to the different providers. Side note, it would also play nicely with #40 as the OpenAI client would handle those errors.

Perhaps each provider could be under a separate compatability URL e.g. http://localhost:8002/api/compat/openai/providers/{{ provider_slug }}/

Ollama implemented something similar recently via a middleware which maps OpenAI API objects to their own internal representation if you need some inspiration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions