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

[R-313] Adding more LLM/Embedding Providers #1617

Open
jjmachan opened this issue Nov 4, 2024 · 3 comments
Open

[R-313] Adding more LLM/Embedding Providers #1617

jjmachan opened this issue Nov 4, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@jjmachan
Copy link
Member

jjmachan commented Nov 4, 2024

A running issue to get feedback on which LLM or Embedding Providers we need to add for you

R-313

@jjmachan jjmachan added the enhancement New feature or request label Nov 4, 2024
@jjmachan jjmachan changed the title Adding more LLM/Embedding Providers [R-313] Adding more LLM/Embedding Providers Nov 4, 2024
@kent-william007
Copy link

If the output of my model is obtained through a method call, for example, def query_model(query): return response. Then how should I write the code to load the model? In addition, the Embedding model is also generated through a similar method call, providing methods for converting words into vectors and comparing vector similarities.

@jjmachan
Copy link
Member Author

jjmachan commented Nov 7, 2024

hey @kent-william007, in that case you will have to implement

@abstractmethod
def generate_text(
self,
prompt: PromptValue,
n: int = 1,
temperature: float = 1e-8,
stop: t.Optional[t.List[str]] = None,
callbacks: Callbacks = None,
) -> LLMResult: ...
@abstractmethod
async def agenerate_text(
self,
prompt: PromptValue,
n: int = 1,
temperature: t.Optional[float] = None,
stop: t.Optional[t.List[str]] = None,
callbacks: Callbacks = None,
) -> LLMResult: ...

on your own and make sure make sure that the result is of the type https://python.langchain.com/api_reference/core/outputs/langchain_core.outputs.llm_result.LLMResult.html

similarly for https://github.com/explodinggradients/ragas/blob/main/src/ragas/embeddings/base.py

let me know if you have further doubts, we'll help you out 🙂

btw are you on discord?

@kent-william007
Copy link

Is it possible to support model invocation through an API? This way, we can leverage the model capabilities provided by the server without needing to worry about which underlying model is being used.

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

No branches or pull requests

2 participants