New archi: domain driven development
Working but need to check out code
This commit is contained in:
@@ -8,15 +8,26 @@ from fastapi import FastAPI, Request
|
||||
from fastapi.responses import JSONResponse, StreamingResponse
|
||||
|
||||
from agent.llm.deepseek import DeepSeekClient
|
||||
from agent.memory import Memory
|
||||
from agent.llm.ollama import OllamaClient
|
||||
from infrastructure.persistence.memory import Memory
|
||||
from agent.agent import Agent
|
||||
import os
|
||||
|
||||
app = FastAPI(
|
||||
title="LibreChat Agent Backend",
|
||||
version="0.1.0",
|
||||
)
|
||||
|
||||
llm = DeepSeekClient()
|
||||
# Choose LLM based on environment variable
|
||||
llm_provider = os.getenv("LLM_PROVIDER", "deepseek").lower()
|
||||
|
||||
if llm_provider == "ollama":
|
||||
print("🦙 Using Ollama LLM")
|
||||
llm = OllamaClient()
|
||||
else:
|
||||
print("🤖 Using DeepSeek LLM")
|
||||
llm = DeepSeekClient()
|
||||
|
||||
memory = Memory()
|
||||
agent = Agent(llm=llm, memory=memory)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user