You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenRouter is a popular interface towards multiple LLMs. It provides an abstraction for various models with a unified API. Adding support for OpenRouter allows for the use of a multitude of additional LLMs with just a single added provider.
Proposal
It makes most sense to implement an providers::openrouter that implements CompletionModel and EmbeddingModel traits.
OpenRouter supports using the OpenAI SDK or the OpenRouter API directly, so an implementation could likely re-use large majorities of the providers::openai implementation.
The text was updated successfully, but these errors were encountered:
Hey @BitVortex! If the openrouter API is exactly the same as the OpenAI API (which seems to be the case), then you can simply reuse the existing openai client by changing the url using from_url, e.g.:
use rig::providers::openai;let openrouter = openai::Client::from_url("OPENROUTER_API_KEY","https://openrouter.ai/api/v1");
Feature Request
OpenRouter is a popular interface towards multiple LLMs. It provides an abstraction for various models with a unified API. Adding support for OpenRouter allows for the use of a multitude of additional LLMs with just a single added provider.
Proposal
It makes most sense to implement an
providers::openrouter
that implementsCompletionModel
andEmbeddingModel
traits.OpenRouter supports using the OpenAI SDK or the OpenRouter API directly, so an implementation could likely re-use large majorities of the
providers::openai
implementation.The text was updated successfully, but these errors were encountered: