feat(api): add api rout chat

This commit is contained in:
11linear11
2026-08-31 06:56:30 -04:00
parent d89b8e500e
commit 15089dc0fe
2 changed files with 26 additions and 0 deletions
+1
View File
@@ -6,6 +6,7 @@ class Settings(BaseSettings):
app_name: str = "Technical Documentation Assistant"
app_version: str = "1.0.0"
app_environment: str = "development" # development,production
app_description: str = "just a assistant"
# LLM Config
api_key: str
+25
View File
@@ -0,0 +1,25 @@
# pyrefly: ignore [missing-import]
from fastapi import FastAPI
from app.api.v1.chat import router as chat_router
from app.core.config import settings
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI(
title=settings.app_name,
version=settings.app_version,
description=settings.app_description,
)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(chat_router, prefix="/api/v1")
@app.get("/api/v1/health", tags=["Health"])
async def health_check():
return {"status": "healthy"}