ДОбился запуска
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import gradio as gr
|
||||
import asyncio
|
||||
import os
|
||||
from typing import List
|
||||
from agent_core import create_agent_graph
|
||||
from local_knowledge_base import LocalKnowledgeBase
|
||||
from langchain_core.messages import HumanMessage
|
||||
|
||||
class AgenticRAGInterface:
|
||||
def __init__(self, agent_graph, knowledge_base):
|
||||
@@ -61,8 +65,15 @@ class AgenticRAGInterface:
|
||||
self.conversation_history = []
|
||||
return "История очищена", ""
|
||||
|
||||
# Инициализируем базу
|
||||
kb = LocalKnowledgeBase()
|
||||
# Загружаем документы (если есть)
|
||||
if os.path.exists("./documents"):
|
||||
kb.load_documents("./documents")
|
||||
|
||||
|
||||
# Создаем интерфейс
|
||||
interface = AgenticRAGInterface(agent_graph, kb)
|
||||
interface = AgenticRAGInterface(create_agent_graph(), kb)
|
||||
|
||||
# Создаем Gradio интерфейс
|
||||
def create_gradio_interface():
|
||||
|
||||
Reference in New Issue
Block a user