push gitignore
This commit is contained in:
@@ -4,7 +4,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
from pydantic import Field
|
||||
|
||||
# ⚠️ 注意: 您需要安装 pydantic-settings: pip install pydantic-settings
|
||||
DEBUG = os.environ.get("DEBUG", True)
|
||||
DEBUG = os.environ.get("DEBUG", 1)
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
@@ -34,10 +34,10 @@ class Settings(BaseSettings):
|
||||
STYLIST_GUIDE_DIR: str = Field(default="/workspace/lc_stylist_agent/app/core/data/stylist_guide", description="风格指南文本目录")
|
||||
|
||||
# 向量数据库配置参数
|
||||
if DEBUG:
|
||||
VECTOR_DB_DIR: str = Field(default="./db", description="向量数据库目录")
|
||||
if DEBUG == 1:
|
||||
VECTOR_DB_DIR: str = Field(default="/workspace/lc_stylist_agent/db", description="向量数据库目录")
|
||||
else:
|
||||
VECTOR_DB_DIR: str = Field(default="./app/db", description="向量数据库目录")
|
||||
VECTOR_DB_DIR: str = Field(default="/db", description="向量数据库目录")
|
||||
COLLECTION_NAME: str = Field(default="lc_clothing_embedding", description="向量数据库集合名称")
|
||||
EMBEDDING_MODEL_NAME: str = Field(default="openai/clip-vit-base-patch32", description="CLIP嵌入模型名称")
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import logging.config
|
||||
import os
|
||||
|
||||
import litserve as ls
|
||||
from app.core.config import DEBUG, settings
|
||||
from app.server.ChatbotAgent.agent_server import LCAgent
|
||||
from app.server.ChatbotAgent.chatbot_server import LCChatBot
|
||||
from logging_env import LOGGER_CONFIG_DICT
|
||||
@@ -20,6 +20,8 @@ logging.config.dictConfig(LOGGER_CONFIG_DICT)
|
||||
|
||||
# STEP 2: START THE SERVER
|
||||
if __name__ == "__main__":
|
||||
logger.info(f"DEBUG -> :{DEBUG}")
|
||||
logger.info(f"VECTOR_DB_DIR -> :{settings.VECTOR_DB_DIR}")
|
||||
chat_boot_api = LCChatBot(enable_async=True, stream=True, api_path='/api/v1/chatbot')
|
||||
agent_api = LCAgent(enable_async=True, api_path='/api/v1/agent')
|
||||
server = ls.LitServer([chat_boot_api, agent_api])
|
||||
|
||||
Reference in New Issue
Block a user