flare / app.py
ciyidogan's picture
Upload 6 files
a06a7a8 verified
raw
history blame
952 Bytes
from fastapi import FastAPI
from controllers import chat_controller, test_controller, admin_controller, health_controller
from core import service_config, session_store, llm_models
from llm_model import LLMModel
from log import log
app = FastAPI()
app.include_router(health_controller.router)
app.include_router(chat_controller.router)
app.include_router(test_controller.router)
app.include_router(admin_controller.router)
if __name__ == "__main__":
log("🌐 Servis başlatılıyor...")
service_config.load(is_reload=False)
for project_name in service_config.projects:
llm_config = service_config.get_project_llm_config(project_name)
model_instance = LLMModel()
model_instance.setup(service_config, llm_config)
llm_models[project_name] = model_instance
log(f"✅ '{project_name}' için model yüklendi.")
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=7860)