aef8791151
- Added Appshell component with responsive navbar and main content area - Integrated ColorSchemeToggle for light/dark mode switching - Created Welcome component with styled title and introductory text - Developed ChatPage for LLM interaction with WebSocket support - Implemented Biblioteca for managing notes with rich text editor - Added LoginPage for user authentication with error handling - Introduced MessageList and MessageBubble components for chat messages - Styled components with CSS modules for consistent design
28 lines
734 B
Python
28 lines
734 B
Python
# backend/main.py
|
|
|
|
from fastapi import FastAPI
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from backend.router_v1 import router
|
|
from backend.backend_domains.llms import llm_chat_ws_endpoint_v1
|
|
|
|
|
|
app = FastAPI(
|
|
title="Fitz Backend",
|
|
description="API para interacción con el frontend y ejecución de tareas",
|
|
version="0.1.0"
|
|
)
|
|
|
|
# Configuración de CORS
|
|
app.add_middleware(
|
|
CORSMiddleware,
|
|
allow_origins=["http://localhost:5173", "http://0.0.0.0:5173"], # Solo permite tu frontend local
|
|
allow_credentials=True,
|
|
allow_methods=["*"],
|
|
allow_headers=["*"],
|
|
)
|
|
|
|
|
|
# Incluye las rutas de tu API
|
|
app.include_router(router, prefix="/api/v1", tags=["v1"])
|
|
app.include_router(llm_chat_ws_endpoint_v1.router)
|