mirror of
https://github.com/run-llama/rags.git
synced 2026-06-30 20:57:57 -04:00
how to load local modell??????????? #28
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @khalilxg on GitHub (Dec 24, 2023).
@0xM4sk commented on GitHub (Apr 24, 2024):
modified core/builder_config.py ---
from llama_index.llms.openai_like import OpenAILike
API_KEY = os.getenv('OPENAI_API_KEY')
BUILDER_LLM = OpenAILike(
api_base="[IP]:1337",
model="[model ID]",
is_chat_model=True,
max_tokens=None,
api_version="v1",
api_key=API_KEY,
)
using this method I was able to perform inference against local models hosted by Jan. Unfortunately my TensorRT Mistral model had streaming issues but I got other models working partially. .streamlit/secrets.toml does seem to need a valid openai API key, im not seeing any usage, but worth noting.