Chicha——人工智能汉堡代理商

 
奇查 是一种生产就绪的人工智能代理,能够弥合自然语言和现实世界食品配送物流之间的差距。与简单的聊天机器人不同,Chicha直接连接到送餐平台(如Uber Eats)来管理一顿饭的整个生命周期。
概述
该项目演示了一个无服务器AI代理架构,使用 LangChain.js 和那个 模型上下文协议(MCP)它旨在超越简单的文本生成,进入“代理AI”——采取行动的软件。
核心能力(实时和计划)
- 🧠 情境感知AI:记住您的饮食偏好、地点和订单历史
- 🔌 真正的融合:与Uber Eats API无缝连接,用于现场餐厅发现和订购
- 📍 地理位置:基于位置的智能餐厅发现,具有回退选项
- 🛍️ 统一订购:跨多个交付平台的一致界面
- 🔐 安全认证:具有安全令牌管理的OAuth 2.0
- 📊 实时更新:实时订单跟踪和状态通知
建筑
高级体系结构
graph TD
subgraph "Client Layer"
A[Web App] -->|API Calls| B[Agent API]
C[Mobile App] -->|API Calls| B
D[Chat Interface] -->|Streaming| B
end
subgraph "AI Layer"
B -->|Process Request| E[LangChain Agent]
E -->|Tool Calls| F[MCP Tools]
F -->|Uber Eats| G[External APIs]
F -->|Payments| H[Crypto Payment Gateway]
E -->|Data Storage| I[Cosmos DB]
end
subgraph "Infrastructure"
J[Azure Functions]
K[Static Web Apps]
L[Application Insights]
end组件详细信息
| 服务 | 角色 | 技术 | 主要功能 |
|---|---|---|---|
| 代理Web应用程序 | 前端接口 | React/Lit,TypeScript | 实时聊天、地理定位、响应式UI |
| 代理API | AI编排 | Node.js、LangChain.js | 自然语言处理、工具编排 |
| 汉堡MCP | API集成 | Azure功能 | 外部服务的标准化工具界面 |
| 汉堡API | 业务逻辑 | Node.js、Cosmos DB | 订单管理、用户配置文件、支付处理 |
入门指南
先决条件
- Node.js 18+
- Azure帐户
- 优步吃掉开发者账户
- Azure命令行界面
azure-dev扩展
本地开发
- 克隆仓库
git clone https://github.com/yourusername/chicha-ai-burgers.git
cd chicha-ai-burgers- 安装依赖项
npm install- 设置环境变量
cp .env.example .env
# Edit .env with your credentials- 启动开发服务器
npm run dev部署
Azure部署
整个堆栈在Infrastructure中定义为代码(二头肌),用于一键部署。
# Install Azure Developer CLI
azd auth login
azd up这将提供:
- Azure OpenAI服务
- Azure Cosmos数据库(无服务器)
- Azure函数(灵活消费)
- Azure静态Web应用程序
- 应用洞察
环境配置
更新Azure部署中的以下环境变量:
# Required for Uber Eats Integration
UBER_CLIENT_ID=your_client_id
UBER_CLIENT_SECRET=your_client_secret
UBER_REDIRECT_URI=your_redirect_uri
# Required for Azure Services
AZURE_OPENAI_API_KEY=your_openai_key
COSMOS_CONNECTION_STRING=your_cosmos_connection_string开发工作流程
编码结构
chicha-ai-burgers/
├── packages/
│ ├── agent-api/ # LangChain.js agent and API endpoints
│ ├── agent-webapp/ # React frontend
│ ├── burger-api/ # Core business logic and database
│ └── burger-mcp/ # MCP tools and integrations
├── infra/ # Bicep templates
└── docs/ # Documentation测试
运行测试套件:
npm test对于端到端测试:
npm run test:e2e贡献
我们欢迎捐款!请查看我们的 贡献指南 了解详情。
- 复刻仓库
- 创建功能分支(
git checkout -b feature/AmazingFeature) - 提交您的更改(
git commit -m 'Add some AmazingFeature') - 推到分支(
git push origin feature/AmazingFeature) - 打开拉取请求
现实生活场景
1.忙碌的专业人士的午餐订单
场景亚历克斯有连续的会议,但需要安排午餐。
sequenceDiagram
participant Alex
participant Chicha
participant Restaurant
participant Courier
Alex->>Chicha: "Schedule a burger for lunch at 1pm"
Chicha->>Alex: "I found 3 burger places near your office. Which one would you like?"
Alex->>Chicha: "The closest one with the best rating"
Chicha->>Restaurant: Checks menu and operating hours
Chicha->>Alex: "Burger Palace has your favorite cheeseburger. Schedule for 1pm?"
Alex->>Chicha: "Yes, and add bacon and extra pickles"
Chicha->>Alex: "Got it! I'll place your order at 12:30pm for 1pm delivery. You'll be notified when it's on the way."
Note over Chicha: At 12:30pm...
Chicha->>Restaurant: Places order
Restaurant-->>Chicha: Order confirmed for 1pm
Note over Chicha: At 12:55pm...
Chicha->>Alex: "Your order is being prepared and will arrive at 1pm"
Note over Chicha: At 12:58pm...
Chicha->>Alex: "Your order is out for delivery! Courier is 2 minutes away."
Courier->>Alex: Arrives at door
Alex->>Courier: Receives order
Chicha->>Alex: "Enjoy your meal! Would you like to rate your experience?"2.游戏之夜团体订单
场景:杰米正在接待朋友,需要为小组订购。
graph TD
A[Jamie starts group order] --> B[Shares link with friends]
B --> C[Friends add items to cart]
C --> D[Chicha suggests combos and deals]
D --> E[Group confirms order]
E --> F[Chicha tracks all items]
F --> G[Splits payment automatically]
G --> H[Live tracking for everyone]
H --> I[Notifications for each delivery milestone]3.有特殊要求的深夜渴望
场景泰勒在午夜因特定的饮食需求而感到饥饿。
- 初始请求:
- 泰勒:“我想要一个素食汉堡,里面有无麸质面包,没有洋葱,还有额外的泡菜” - 奇查:“我发现现在有两个地方可以满足你的要求。这是你的选择……”
- 订单定制:
- Chicha确认每一项修改 - 建议补充项目(纯素奶昔?) - 提供预计到达时间并实时跟踪订单
- 交付:
- 发送“5分钟后”通知 - 提供快递详细信息和实时位置 - 确认交货完成
4.每周预定的膳食准备
场景山姆想为工作周安排健康的饮食。
gantt
title Sam's Weekly Meal Schedule
dateFormat HH:mm
axisFormat %I:%M %p
section Monday
Protein Bowl from Fresh & Co :mon1, 12:00, 30m
section Wednesday
Grilled Chicken Salad :wed1, 12:30, 30m
section Friday
Cheat Day Burger :fri1, 13:00, 30m时间表详细信息:
| 日期 | 时间 | 用餐 | 餐厅 |
|---|---|---|---|
| 周一 | 中午12:00 | 蛋白碗 | 新鲜可口可乐 |
| 星期三 | 下午12:30 | 烤鸡沙拉 | 健康饮食 |
| 周五 | 下午1:00 | 作弊日汉堡 | 汉堡宫 |
演示的功能:
- 定期订单
- 膳食计划
- 饮食偏好记忆
- 自动付款
- 交货时间优化
5.企业餐饮订单
场景:为一个有具体要求的20人团队做准备。
- 批量订购:
- 多种用餐选择 - 单独包装 - 每人特殊说明
- 物流:
- 预定交货窗口 - 非接触式交付设置 - 费用报告集成
- 邮购:
- 数字收据 - 团队反馈收集 - 为下次保存的收藏夹订单
路线图
当前重点
- \[\]使用WebSockets进行实时订单跟踪
- \[\]多语言支持
- \[\]高级饮食偏好处理
即将推出的功能
- \[\]语音接口集成
- \[\]团体订购
- \[\]基于人工智能的菜单推荐
资源
许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
支持
如需支持,请 打开一个问题 或联系我们的团队support@chicha.ai
