Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions fern/apis/fai/definition/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ service:
docs: Retrieve the usage histogram analytics for a given period
path: /histogram/{domain}
method: GET
audiences:
- internal
path-parameters:
domain: string
request:
Expand All @@ -33,6 +35,8 @@ service:
docs: Retrieve the insights for a given period
path: /insights/{domain}
method: GET
audiences:
- internal
path-parameters:
domain: string
request:
Expand Down
2 changes: 2 additions & 0 deletions fern/apis/fai/definition/chat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ service:
docs: Create a docs chat completion for a given domain
path: /{domain}
method: POST
audiences:
- customers
path-parameters:
domain: string
request:
Expand Down
2 changes: 2 additions & 0 deletions fern/apis/fai/definition/conversations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ service:
docs: Retrieve a complete conversation by conversation id
path: /{domain}/{conversation_id}
method: GET
audiences:
- customers
path-parameters:
domain: string
conversation_id: string
Expand Down
28 changes: 25 additions & 3 deletions fern/apis/fai/definition/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ service:
docs: Index a document for a given domain
path: /{domain}
method: POST
audiences:
- customers
path-parameters:
domain: string
request:
Expand All @@ -27,7 +29,7 @@ service:
context:
type: list<string>
docs: The context of the document, as a list of strings, that will be indexed.
content:
document:
type: string
docs: The content of the document that will be returned in the tool response
errors:
Expand All @@ -54,6 +56,8 @@ service:
docs: Update a document for a given domain
path: /{domain}/update
method: POST
audiences:
- customers
path-parameters:
domain: string
request:
Expand All @@ -68,22 +72,40 @@ service:
context:
type: list<string>
docs: The context of the document, as a list of strings, that will be indexed.
content:
document:
type: string
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.
response: ContextResponse
errors:
- commons.BadRequestError
- commons.InternalError

syncToQueryIndex:
docs: Sync an index with the query index
path: /{domain}/sync
method: POST
audiences:
- internal
path-parameters:
domain: string
request:
name: SyncIndexRequest
query-parameters:
index_name:
type: string
docs: The name of the index to sync
errors:
- commons.BadRequestError
- commons.InternalError

types:
ContextResponse:
properties:
document_id: string
domain: string
context_id: string
context: list<string>
content: string
document: string
is_active: boolean
created_at: datetime
updated_at: datetime
4 changes: 4 additions & 0 deletions fern/apis/fai/definition/queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ service:
docs: Log a new query to the FAI DB
path: /queries
method: POST
audiences:
- internal
request:
name: CreateQueryRequest
body:
Expand All @@ -34,6 +36,8 @@ service:
docs: Retrieve all paginated recent queries
path: /queries/{domain}
method: GET
audiences:
- internal
path-parameters:
domain:
type: string
Expand Down
10 changes: 3 additions & 7 deletions fern/products/ask-fern/ask-fern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ navigation:
api-name: fai
icon: fa-regular fa-pro
paginated: true
audiences:
- customers
layout:
- page: Overview
path: ./pages/getting-started/api-get-started.mdx
- chat:
- endpoint: chat.chatCompletion
- index:
- endpoint: index.indexDocument
- endpoint: index.getDocument
- endpoint: index.updateDocument
path: ./pages/getting-started/api-get-started.mdx