feat: Implement WebSocket support for chat functionality and refactor chat service

- Added WebSocket endpoint for real-time chat interactions.
- Refactored ChatPage component to utilize WebSocket for sending and receiving messages.
- Updated chat service to handle streaming responses from the LLM agent.
- Introduced error handling for WebSocket connections and message processing.
- Modified Editor_Test to include AppShellWithMenu for better layout.
- Adjusted file path in generar_tree.py for correct directory structure.
- Created llm_chat_endpoint_v1.py and llm_chat_srvc.py for handling chat requests and responses.
- Established logging for WebSocket interactions and errors.
This commit is contained in:
2025-06-17 00:19:36 +02:00
parent 6d6fab5634
commit 9ee8daa295
9 changed files with 233 additions and 1028 deletions
+4 -1
View File
@@ -3,6 +3,8 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from backend.router_v1 import router
from backend.domains.llms import llm_chat_ws_endpoint_v1
app = FastAPI(
title="Fitz Backend",
@@ -21,4 +23,5 @@ app.add_middleware(
# Incluye las rutas de tu API
app.include_router(router, prefix="/api/v1", tags=["v1"])
app.include_router(router, prefix="/api/v1", tags=["v1"])
app.include_router(llm_chat_ws_endpoint_v1.router)