Recommended way to use Quivr with LM Studio or Ollama for local chat + embeddings? #3675
Unanswered
byeugenius
asked this question in
Q&A
Replies: 2 comments
|
Hi @byeugenius! I'm Dosu and I’m helping the quivr team. Both LM Studio and Ollama can work with Quivr since they expose OpenAI-compatible endpoints. The recommended approach is to pass a custom Here's a minimal fully-local example: from quivr_core import Brain
from quivr_core.llm import LLMEndpoint
from quivr_core.rag.entities.config import LLMEndpointConfig
from langchain_openai import OpenAIEmbeddings
# Configure local LLM (LM Studio or Ollama)
llm = LLMEndpoint.from_config(
LLMEndpointConfig(
model="llama2", # your local model name
llm_api_key="test", # dummy key for local
llm_base_url="http://localhost:8441" # LM Studio default, or :11434 for Ollama
)
)
# Configure local embeddings
embedder = OpenAIEmbeddings(
model="your-embedding-model",
api_key="test",
base_url="http://localhost:8441" # your local embeddings endpoint
)
brain = Brain.from_files(
name="local_brain",
file_paths=["document.pdf"],
llm=llm,
embedder=embedder
)
response = brain.ask("What is this document about?")
print(response.answer)A few things to be aware of:
Hope this helps with your Telegram bot setup! One thing to watch out for is the function calling limitation—depending on which local model you run, some RAG workflows may behave differently than with OpenAI models. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I'm integrating Quivr into a Telegram support bot and want to run the stack locally.
Current setup:
Questions:
LLMEndpointand a custom embedder toBrain.from_files(...), or should we rely on environment variables such asOPENAI_BASE_URL/OPENAI_API_KEY?Any guidance would help. Thanks.
All reactions