forked from gmpetrov/databerry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.openapi.yaml
68 lines (68 loc) · 1.8 KB
/
base.openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
openapi: 3.0.2
info:
title: Retrieval Plugin API
description: A retrieval API for querying and filtering documents based on natural language queries and metadata
version: 1.0.0
servers:
- url: https://your-app-url.com
paths:
/DATASTORE_QUERY_PATH:
post:
summary: Query
description: Accepts search query objects array each with query and optional filter. Break down complex questions into sub-questions. Refine results by criteria, e.g. time / source, don't do this often. Split queries if ResponseTooLargeError occurs.
operationId: query_query_post
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/QueryRequest"
required: true
responses:
"200":
description: Successful Response
content:
application/json:
schema:
$ref: "#/components/schemas/QueryResponse"
security:
- HTTPBearer: []
components:
schemas:
QueryRequest:
title: QueryRequest
required:
- query
type: object
properties:
query:
title: Query
type: string
top_k:
title: Top K
description: The number of text 256 tokens large chunks to return
type: integer
default: 3
QueryResponse:
title: QueryResponse
type: array
items:
$ref: "#/components/schemas/QueryResult"
QueryResult:
title: QueryResult
required:
- text
type: object
properties:
text:
title: Text
type: string
source:
title: Source
type: string
score:
title: Score
type: number
securitySchemes:
HTTPBearer:
type: http
scheme: bearer