Skip to content

Conversation

Kerollmops
Copy link

Some APIs are close to being compatible with this crate. The byot (bring your own type) feature is handy, but useless when the path is incompatible.

For example, Ollama's chat completions route is close to the OpenAI API but reachable on the /api/chat route. On the other hand, Claude (Anthropic) is available through the /v1/messages route, which is also very close to being compatible with the OpenAI API.

@64bit
Copy link
Owner

64bit commented Jun 7, 2025

Thank you for PR!

This can be achieved with a custom config which generates path - https://docs.rs/async-openai/latest/async_openai/config/trait.Config.html#tymethod.url

Open to suggestion for a better design that works across all APIs instead of one off for chat completions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants