Install
openclaw skills install qunar-travel-query提供去哪儿网旅游信息查询能力;当用户需要查询机票、酒店、景点门票或火车票信息时使用
openclaw skills install qunar-travel-query首次使用时需要配置去哪儿网API Key凭证。当智能体检测到未配置凭证时,会自动触发凭证配置流程:
在使用前,建议阅读 references/api_reference.md 了解各类查询的API端点和参数格式。
意图识别
参数收集与验证
API查询
scripts/qunar_query.py 执行查询query_type: 查询类型(flight/hotel/scenic/train)api_endpoint: API端点URL(根据 references/api_reference.md 确定)api_params: 查询参数字典method: HTTP方法(GET/POST,默认POST)output_format: 输出格式(list/detail/conversation)结果处理与展示
推荐与建议(可选)
python scripts/qunar_query.py --query_type flight --api_endpoint "<机票API端点>" --api_params '{"fromCity":"北京","toCity":"上海","departDate":"2024-01-15"}' --output_format listpython scripts/qunar_query.py --query_type hotel --api_endpoint "<酒店API端点>" --api_params '{"city":"杭州","checkIn":"2024-01-20","checkOut":"2024-01-22"}' --output_format detailpython scripts/qunar_query.py --query_type scenic --api_endpoint "<景点API端点>" --api_params '{"city":"三亚"}' --output_format conversationQ: 如何获取去哪儿网API Key? A: 访问 http://open.qunar.com 注册开发者账号,创建应用后即可获得API Key。
Q: 查询失败怎么办? A: 检查以下几点:1) API Key是否正确配置;2) API端点URL是否正确;3) 查询参数格式是否符合要求;4) 网络连接是否正常。
Q: 如何更换API Key? A: 智能体可以引导你重新配置凭证,或者在系统设置中更新API Key。
Q: 支持哪些查询类型? A: 目前支持机票查询、酒店查询、景点查询、火车票查询。