Skip to content

Commit 7a155ed

Browse files
dsinghvieyw520
andauthored
Update fern definition (#460)
Co-authored-by: eyw520 <[email protected]>
1 parent d863dc1 commit 7a155ed

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
docs: FAI Document API
2+
3+
imports:
4+
commons: ./commons.yml
5+
6+
service:
7+
auth: false
8+
base-path: /document
9+
endpoints:
10+
createDocument:
11+
docs: Index a document for a given domain
12+
path: /{domain}/create
13+
method: POST
14+
audiences:
15+
- customers
16+
path-parameters:
17+
domain: string
18+
request:
19+
name: IndexDocumentRequest
20+
body:
21+
properties:
22+
document:
23+
type: string
24+
docs: The content of the document that will be returned in the tool response
25+
chunk:
26+
type: optional<string>
27+
docs: The chunk of the document that will be indexed as a vector. If not provided, the document will be indexed.
28+
title:
29+
type: optional<string>
30+
docs: The title of the document
31+
url:
32+
type: optional<string>
33+
docs: The url of the document
34+
version:
35+
type: optional<string>
36+
docs: The version of the document
37+
keywords:
38+
type: optional<list<string>>
39+
docs: The keywords of the document
40+
authed:
41+
type: optional<boolean>
42+
docs: Whether the document is authed
43+
response: CreateDocumentResponse
44+
errors:
45+
- commons.BadRequestError
46+
- commons.InternalError
47+
48+
getDocumentById:
49+
docs: Get a document for a given domain
50+
path: /{domain}/{document_id}
51+
method: GET
52+
audiences:
53+
- customers
54+
path-parameters:
55+
domain: string
56+
document_id: string
57+
response: Document
58+
errors:
59+
- commons.BadRequestError
60+
- commons.InternalError
61+
62+
types:
63+
CreateDocumentResponse:
64+
properties:
65+
document_id: string
66+
67+
Document:
68+
properties:
69+
document_id: string
70+
chunk: string
71+
domain: string
72+
document: string
73+
title: optional<string>
74+
url: optional<string>
75+
version: optional<string>
76+
keywords: optional<list<string>>
77+
authed: optional<boolean>
78+
created_at: datetime
79+
updated_at: datetime

0 commit comments

Comments
 (0)