为以下接口提供 OpenAPI JSON Schema:UnifiedSearch - 通晓统一搜索API。
OpenAPI 定义
openapi: 3.1.0 info: version: 1.1.0 title: 通晓 description: "'通晓' 是一个强大的实时搜索 API,可提供来自多种搜索引擎、知识库集合的结构化数据。" servers: - url: https://cloud-iqs.aliyuncs.com/search security: - bearer: [] paths: /llm: post: operationId: search summary: Search description: "标准搜索接口提供增强的网络开放域的实时搜索能力,通过大模型优化与多数据源融合的技术,查询干净、准确、多样、高质量的结果。" x-codeSamples: - lang: bash label: Simple search and contents source: | curl -X POST 'https://cloud-iqs.aliyuncs.com/search/llm' \ -H 'Authorization: Bearer YOUR-TongXiao-API-KEY' \ -H 'Content-Type: application/json' \ -d '{ "query": "Alibaba" }' requestBody: required: true content: application/json: schema: type: object properties: query: type: string description: "搜索问题(长度:>=2 and <=100)" numResults: type: integer maximum: 10 default: 5 description: 搜索结果的数量 example: 5 required: - query responses: "200": $ref: "#/components/responses/SearchResponse" components: securitySchemes: apikey: type: apiKey name: X-API-Key in: header description: API key can be provided via X-API-Key header bearer: type: http scheme: bearer description: API key can be provided via Authorization header with Bearer scheme schemas: PageItem: type: object properties: title: type: string description: "网站标题" link: type: string format: uri description: "网站地址" publishedDate: type: string nullable: true description: "网页发布时间,ISO时间格式。" hostname: type: string description: "站点名" summary: type: string nullable: true description: "网页摘要信息。" mainText: type: string nullable: true description: "解析得到的网页全正文,长度最大3000字符。" responses: SearchResponse: description: OK content: application/json: schema: type: object properties: requestId: type: string description: Unique identifier for the request example: "35E5608A-A737-2038-****-D9D34C6BFD9E" pageItems: type: array description: "web 搜索结果" items: $ref: "#/components/schemas/PageItem" sceneItems: type: array description: "垂类场景的搜索结果" items: type: object properties: type: type: string enum: [weather, time, rili] description: 垂类场景类型 detail: type: string description: 垂类场景搜索结果
OpenAPI Schema
openapi: 3.1.0 info: version: 1.1.0 title: Tongxiao description: "Tongxiao is a powerful real-time search API that provides structured data from various search engines and knowledge base collections." servers: - url: https://cloud-iqs.aliyuncs.com/search security: - bearer: [] paths: /llm: post: operationId: search summary: Search description: "Search API can provide open-domain real-time search capabilities." x-codeSamples: - lang: bash label: Simple search and contents source: | curl -X POST 'https://cloud-iqs.aliyuncs.com/search/llm' \ -H 'Authorization: Bearer YOUR-TongXiao-API-KEY' \ -H 'Content-Type: application/json' \ -d '{ "query": "Alibaba" }' requestBody: required: true content: application/json: schema: type: object properties: query: type: string description: "Search question (length: >= 2 and <= 100)" numResults: type: integer maximum: 10 default: 5 description: "Number of search results." example: 5 required: - query responses: "200": $ref: "#/components/responses/SearchResponse" components: securitySchemes: apikey: type: apiKey name: X-API-Key in: header description: API key can be provided via X-API-Key header bearer: type: http scheme: bearer description: API key can be provided via Authorization header with Bearer scheme schemas: PageItem: type: object properties: title: type: string description: "website title" link: type: string format: uri description: "website address" publishedDate: type: string nullable: true description: "Publish time, timestamp unit (milliseconds)" hostname: type: string description: "hostname" summary: type: string nullable: true description: "webpage summary information" mainText: type: string nullable: true description: "The parsed full text of the webpage, with a maximum length of 3000 characters." responses: SearchResponse: description: OK content: application/json: schema: type: object properties: requestId: type: string description: Unique identifier for the request example: "35E5608A-A737-2038-****-D9D34C6BFD9E" pageItems: type: array description: "Web search results" items: $ref: "#/components/schemas/PageItem" sceneItems: type: array description: "Search results for vertical scenarios" items: type: object properties: type: type: string enum: [weather, time, rili] description: "vertical scenario enums" detail: type: string description: "detail for vertical scenarios"
该文章对您有帮助吗?