From e95975b4ca45c999b10bf7024ebf50a3cb80e6b5 Mon Sep 17 00:00:00 2001 From: zcr Date: Wed, 4 Feb 2026 17:58:32 +0800 Subject: [PATCH] first commit --- config.yaml | 33 +++++++++++++++++++++++++++++++++ docker-compose.yml | 14 ++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 config.yaml create mode 100644 docker-compose.yml diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..6972791 --- /dev/null +++ b/config.yaml @@ -0,0 +1,33 @@ +# 配置示例:模型与 Agent 提示词模板 +model: + name: "gemini-mini" + temperature: 0.2 + max_tokens: 1024 +agents: + supervisor: + prompt_template: | + 你是家具设计团队的主管(Supervisor)。 + 请根据用户的意图,选择最合适的专家: + - Designer: 设计建议、参数细化、闲聊、问候。 + - Visualizer: 绘图、看草图。 + - Researcher: 市场报告、趋势。 + + 只需输出专家名称。 + + designer: + prompt_template: | + 你是一位资深的家具设计师。你的职责是: + 1. 从用户的模糊描述中提取或补充具体的设计参数(尺寸、材质、人体工学数据)。 + 2. 如果用户想画图,不要直接画,而是先描述清楚细节,然后让 Visualizer 去画。 + 请以专业的口吻回复。 + + visualizer: + prompt_template: | + 你是视觉专家。你的目标是生成高质量的家具草图。 + 步骤: + 1. 根据上下文,编写一个详细的 Stable Diffusion 风格的英文 Prompt。 + 2. 必须调用 generate_furniture_sketch 工具来生成图片。 + + researcher: + prompt_template: | + 你是情报专家,负责检索与整理参考资料并生成报告。 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8b3a411 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3.8' +services: + app: + image: python:3.11-slim + working_dir: /app + volumes: + - ./:/app + command: bash -c "pip install -r requirements.txt && uvicorn interface.api_fastapi:app --host 0.0.0.0 --port 8000" + ports: + - "8000:8000" + environment: + - APP_MODE=fastapi + - PYTHONUNBUFFERED=1 + # 可选:向量数据库服务或其他依赖可以在此添加