91 lines
3.0 KiB
Python
91 lines
3.0 KiB
Python
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
LAZADA_TOOLS_ENABLED = {
|
||
|
|
"order_query": True,
|
||
|
|
"product_query": True,
|
||
|
|
"logistics_query": True,
|
||
|
|
"session_list": True,
|
||
|
|
"message_history": True,
|
||
|
|
"orders_query": True,
|
||
|
|
"order_items_query": True,
|
||
|
|
"seller_query": True,
|
||
|
|
}
|
||
|
|
|
||
|
|
LAZADA_TOOL_DESCRIPTIONS = {
|
||
|
|
"order_query": "查询 Lazada 订单详情(订单状态、物流信息、商品明细)",
|
||
|
|
"product_query": "查询 Lazada 商品详情(标题、价格、库存)",
|
||
|
|
"logistics_query": "查询 Lazada 订单物流轨迹",
|
||
|
|
"session_list": "获取卖家所有 IM 会话列表",
|
||
|
|
"message_history": "获取指定会话的历史消息",
|
||
|
|
"orders_query": "批量查询 Lazada 订单列表(支持按状态和时间筛选)",
|
||
|
|
"order_items_query": "查询 Lazada 订单商品明细",
|
||
|
|
"seller_query": "查询 Lazada 卖家信息(名称、状态、邮箱)",
|
||
|
|
}
|
||
|
|
|
||
|
|
LAZADA_TOOL_SCHEMAS = {
|
||
|
|
"order_query": {
|
||
|
|
"name": "lazada_order_query",
|
||
|
|
"description": "查询 Lazada 订单详情",
|
||
|
|
"parameters": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"order_id": {"type": "string", "description": "Lazada 订单 ID"},
|
||
|
|
},
|
||
|
|
"required": ["order_id"],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
"product_query": {
|
||
|
|
"name": "lazada_product_query",
|
||
|
|
"description": "查询 Lazada 商品详情",
|
||
|
|
"parameters": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"item_id": {"type": "string", "description": "Lazada 商品 Item ID"},
|
||
|
|
},
|
||
|
|
"required": ["item_id"],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
"logistics_query": {
|
||
|
|
"name": "lazada_logistics_query",
|
||
|
|
"description": "查询 Lazada 订单物流轨迹",
|
||
|
|
"parameters": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"order_id": {"type": "string", "description": "Lazada 订单 ID"},
|
||
|
|
},
|
||
|
|
"required": ["order_id"],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
"orders_query": {
|
||
|
|
"name": "lazada_orders_query",
|
||
|
|
"description": "批量查询 Lazada 订单列表",
|
||
|
|
"parameters": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"status": {"type": "string", "description": "订单状态筛选"},
|
||
|
|
"update_after": {"type": "string", "description": "更新时间起点(ISO 格式)"},
|
||
|
|
"limit": {"type": "integer", "description": "返回数量上限 (默认 20)"},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
"order_items_query": {
|
||
|
|
"name": "lazada_order_items_query",
|
||
|
|
"description": "查询 Lazada 订单商品明细",
|
||
|
|
"parameters": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {
|
||
|
|
"order_id": {"type": "string", "description": "Lazada 订单 ID"},
|
||
|
|
},
|
||
|
|
"required": ["order_id"],
|
||
|
|
},
|
||
|
|
},
|
||
|
|
"seller_query": {
|
||
|
|
"name": "lazada_seller_query",
|
||
|
|
"description": "查询 Lazada 卖家基本信息",
|
||
|
|
"parameters": {
|
||
|
|
"type": "object",
|
||
|
|
"properties": {},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
}
|