Search Files
Search files
Query Parameters
Query expressed in natural language to retrieve matching text passages within all indexed files in the bot using semantical search.
The number of neighbor passages to prepend and append as surrounding context to the content of each returned passage (default: 1, minimum: 0, maximum: 10).
The maximum number of passages to return.
Consolidate the results by merging matching passages from the same file into a single passage per file. The consolidated passage will include the matching passages ordered by their original position in the file (rather than by relevance score) and include hierarchical context such as the title/subtitle to which they belong.
Include the surrounding context with each passage in the context property of each passage. Not supported when consolidate is set to true.
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/files/search?query=string"{ "passages": [ { "content": "string", "score": 0, "meta": { "type": "chunk", "subtype": "title", "pageNumber": 0, "position": 0, "sourceUrl": "http://example.com" }, "file": { "id": "string", "key": "string", "contentType": "string", "metadata": { "property1": null, "property2": null }, "tags": { "property1": "string", "property2": "string" }, "createdAt": "string", "updatedAt": "string" }, "context": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "text": "string", "offset": 0, "type": "preceding" } ] } ]}{ "passages": [ { "content": "string", "score": 0, "meta": { "type": "chunk", "subtype": "title", "pageNumber": 0, "position": 0, "sourceUrl": "http://example.com" }, "file": { "id": "string", "key": "string", "contentType": "string", "metadata": { "property1": null, "property2": null }, "tags": { "property1": "string", "property2": "string" }, "createdAt": "string", "updatedAt": "string" }, "context": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "text": "string", "offset": 0, "type": "preceding" } ] } ]}