Skip to content

Commit de48493

Browse files
authored
chore(docs): Add more descriptive parameter descriptions to fai APIs. (#533)
1 parent 6e8100c commit de48493

File tree

2 files changed

+43
-24
lines changed

2 files changed

+43
-24
lines changed

fern/apis/fai/definition/document.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,32 @@ service:
2222
properties:
2323
document:
2424
type: string
25-
docs: The content of the document that will be returned in the tool response
25+
docs: The content of the document that will be returned to Ask Fern during document retrieval.
2626
chunk:
2727
type: optional<string>
28-
docs: The chunk of the document that will be indexed as a vector. If not provided, the document will be indexed.
28+
docs: The textual content that should be vectorized when indexing the document. If not provided, the full document will be vectorized.
2929
title:
3030
type: optional<string>
31-
docs: The title of the document
31+
docs: The title of the document. This will be used with the `url` when Ask Fern cites this document.
3232
url:
3333
type: optional<string>
34-
docs: The url of the document
34+
docs: The url of the document. This will be used as the source of the document when Ask Fern cites it.
3535
version:
3636
type: optional<string>
37-
docs: The version of the document
37+
docs: |
38+
The version of the document. This will be compared against when running Ask Fern with version filters.
39+
If null, the document will be retrievable by all versions.
3840
product:
3941
type: optional<string>
40-
docs: The product of the document
42+
docs: |
43+
The product of the document. This will be used to filter documents when running Ask Fern with product filters.
44+
If null, the document will be retrievable by all products.
4145
keywords:
4246
type: optional<list<string>>
43-
docs: The keywords of the document
47+
docs: The keywords of the document. Adding keywords can improve document matching.
4448
authed:
4549
type: optional<boolean>
46-
docs: Whether the document is authed
50+
docs: Whether the document is authed. If true, the document will be retrievable by all users.
4751
response: DocumentIdResponse
4852
errors:
4953
- commons.BadRequestError
@@ -64,28 +68,38 @@ service:
6468
properties:
6569
document:
6670
type: optional<string>
67-
docs: The content of the document that will be returned in the tool response.
71+
docs: |
72+
The updated content of the document that will be returned to Ask Fern during document retrieval.
73+
If not provided, this field will remain unchanged.
6874
chunk:
6975
type: optional<string>
70-
docs: The chunk of the document that will be indexed as a vector.
76+
docs: |
77+
The updated textual content that should be vectorized when indexing the document.
78+
If not provided, this field will remain unchanged.
7179
title:
7280
type: optional<string>
73-
docs: The title of the document
81+
docs: |
82+
The updated title of the document. If not provided, this field will remain unchanged.
7483
url:
7584
type: optional<string>
76-
docs: The url of the document
85+
docs: |
86+
The updated url of the document. If not provided, this field will remain unchanged.
7787
version:
7888
type: optional<string>
79-
docs: The version of the document
89+
docs: |
90+
The updated version of the document. If not provided, this field will remain unchanged.
8091
product:
8192
type: optional<string>
82-
docs: The product of the document
93+
docs: |
94+
The updated product of the document. If not provided, this field will remain unchanged.
8395
keywords:
8496
type: optional<list<string>>
85-
docs: The keywords of the document
97+
docs: |
98+
The updated keywords of the document. If not provided, this field will remain unchanged.
8699
authed:
87100
type: optional<boolean>
88-
docs: Whether the document is authed
101+
docs: |
102+
The updated authed status of the document. If not provided, this field will remain unchanged.
89103
response: Document
90104
errors:
91105
- commons.BadRequestError

fern/apis/fai/definition/guidance.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ service:
88
base-path: /guidance
99
endpoints:
1010
createGuidance:
11-
docs: |
12-
Create a guidance for a given domain. Guidance can be used to provide additional context to Ask Fern and improve its accuracy.
11+
docs: Index a guidance document for a given domain
1312
path: /{domain}/create
1413
method: POST
1514
audiences:
@@ -22,10 +21,12 @@ service:
2221
properties:
2322
context:
2423
type: list<string>
25-
docs: The context of the guidance document, as a list of strings, that will be indexed.
24+
docs: |
25+
The context of the guidance document, as a list of strings, that will be indexed.
26+
Each string will be vectorized separately to generate a separate record.
2627
document:
2728
type: string
28-
docs: The content of the guidance document that will be returned in the tool response
29+
docs: The content of the guidance document that will be returned to Ask Fern during Ask Fern retrieval.
2930
response: GuidanceIdResponse
3031
errors:
3132
- commons.BadRequestError
@@ -45,11 +46,15 @@ service:
4546
body:
4647
properties:
4748
context:
48-
type: list<string>
49-
docs: The context of the document, as a list of strings, that will be indexed.
49+
type: optional<list<string>>
50+
docs: |
51+
The updated context of the guidance document, as a list of strings, that will be indexed.
52+
If not provided, this field will remain unchanged.
5053
document:
51-
type: string
52-
docs: The content of the document that will be returned in the tool response. If not provided, the document will be removed from the index.
54+
type: optional<string>
55+
docs: |
56+
The updated content of the guidance document that will be returned to Ask Fern during Ask Fern retrieval.
57+
If not provided, this field will remain unchanged.
5358
response: Guidance
5459
errors:
5560
- commons.BadRequestError

0 commit comments

Comments
 (0)