Spaces:
Sleeping
Sleeping
File size: 653 Bytes
7b4b748 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | from assistants.langchain_assistant import LangChainAssistant
from config import OSSConfig
from llm.factory import build_oss_llm
from tools.registry import get_tools
class OpenSourceAssistant(LangChainAssistant):
"""Open-source assistant via LangChain + Hugging Face."""
def __init__(self, config: OSSConfig, system_prompt: str) -> None:
super().__init__(
llm=build_oss_llm(config),
model_id=config.model_id,
system_prompt=system_prompt,
max_history_turns=config.max_history_turns,
tools=get_tools(),
session_id="oss",
guard_identity=True,
)
|