使用说明
Eve-你的幕僚长
Eve是一款基于GPT-5.2的人工智能助手,通过全面的品牌研究、竞争分析和数据库存储,帮助您了解您的业务格局。
项目结构
├── llm_host.py # Main application - handles LLM interactions
├── mcp_client.py # MCP protocol client - connects to MCP servers
├── eve_config.py # Eve's configuration and system prompt
├── .env # API keys and database connection
└── requirements.txt # Python dependencies
设置
- 安装依赖项:
pip install -r requirements.txt
- 确保Node.js和
npx已为MCP服务器安装:
# Check if Node.js is installed
node --version
npx --version
# If not installed, download from: https://nodejs.org/
- 你的
.env文件应包含:
AIML_API_KEY=your_aiml_api_key
TAVILY_API=your_tavily_api_key
POSTGRES_URL="postgresql://user:password@localhost:5432/database"
- 使用竞争对手表设置PostgreSQL数据库:
CREATE TABLE competitors (
id SERIAL PRIMARY KEY,
brand_name TEXT,
website TEXT,
source TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
奔跑夏娃
python llm_host.py
运作原理
-
llm_host.py -主编排器
- 通过AIML API管理与GPT-5.2的对话
- 处理工具调用流程
- 与多个MCP客户端协调
-
mcp_client.py -MCP协议处理程序
- 启动MCP服务器进程(Tavily、PostgreSQL)
- 发现可用工具
- 通过stdio上的JSON-RPC执行工具调用
-
eve_config.py -配置
- 夏娃的个性与制度提示
- MCP服务器配置
特性
- 通过Tavily MCP服务器进行互联网搜索
- PostgreSQL数据库访问,用于存储和检索品牌研究
- 品牌研究和竞争分析
- 专业参谋长语气
- 实时工具执行
- 对话历史管理
- 多服务器MCP支持
示例用法
店铺研究:
You: Research Nike and store their main competitors in the database
Eve: [Uses Tavily to search for Nike competitors]
[Stores findings in PostgreSQL database]
[Provides comprehensive analysis]
检索存储的数据:
You: What competitors do we have stored?
Eve: [Queries PostgreSQL database]
[Returns list of stored competitors]
综合研究:
You: Compare Adidas with our stored Nike data
Eve: [Queries database for Nike]
[Searches web for Adidas]
[Provides comparative analysis]
数据库模式
这 competitors 表:
id-主键(自动递增)brand_name-公司/品牌名称website-公司网站URLsource-信息来自哪里created_at-创建记录的时间戳
使用的MCP服务器
-
Tavily MCP (
tavily-mcp@0.1.3)- 工具:
tavily-search,tavily-extract - 目的:互联网搜索和内容提取
- 工具:
-
PostgreSQL MCP (
@modelcontextprotocol/server-postgres)- 工具:
query,list_tables,describe_table - 目的:数据库操作
- 工具:
