diff --git a/fern/apis/fai/definition/analytics.yml b/fern/apis/fai/definition/analytics.yml deleted file mode 100644 index f5421400f..000000000 --- a/fern/apis/fai/definition/analytics.yml +++ /dev/null @@ -1,82 +0,0 @@ -docs: FAI Analytics API - -imports: - commons: ./commons.yml - -service: - auth: false - base-path: /analytics - endpoints: - getHistogramAnalytics: - docs: Retrieve the usage histogram analytics for a given period - path: /histogram/{domain} - method: GET - audiences: - - internal - path-parameters: - domain: string - request: - name: GetHistogramAnalyticsRequest - query-parameters: - start_date: - type: optional - docs: The start date of the period to retrieve analytics for - end_date: - type: optional - docs: The end date of the period to retrieve analytics for - groupBy: - type: GroupBy - docs: The field to group the analytics by - response: HistogramAnalytics - errors: - - commons.BadRequestError - - commons.InternalError - getInsights: - docs: Retrieve the insights for a given period - path: /insights/{domain} - method: GET - audiences: - - internal - path-parameters: - domain: string - request: - name: GetInsightsRequest - query-parameters: - start_date: - type: optional - docs: The start date of the period to retrieve analytics for - end_date: - type: optional - docs: The end date of the period to retrieve analytics for - response: Insights - errors: - - commons.BadRequestError - - commons.InternalError - -types: - GroupBy: - enum: - - "DAY" - - "WEEK" - - "MONTH" - - HistogramAnalytics: - properties: - bars: list - - HistogramAnalyticsBar: - properties: - label: string - queryCount: integer - conversationCount: integer - - Insights: - properties: - insights: list - - Insight: - properties: - insightText: string - numberOfQueries: integer - examples: list - \ No newline at end of file diff --git a/fern/apis/fai/definition/api.yml b/fern/apis/fai/definition/api.yml deleted file mode 100644 index e5b7ac2c7..000000000 --- a/fern/apis/fai/definition/api.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: fai -auth: bearer -default-environment: Prod -environments: - Prod: https://fai.buildwithfern.com -error-discrimination: - strategy: property - property-name: error \ No newline at end of file diff --git a/fern/apis/fai/definition/chat.yml b/fern/apis/fai/definition/chat.yml deleted file mode 100644 index da8134481..000000000 --- a/fern/apis/fai/definition/chat.yml +++ /dev/null @@ -1,52 +0,0 @@ -docs: FAI Chat API - -imports: - commons: ./commons.yml - -service: - auth: false - base-path: /chat - endpoints: - chatCompletion: - docs: Create a docs chat completion for a given domain - path: /{domain} - method: POST - audiences: - - customers - path-parameters: - domain: string - request: - name: ChatCompletionRequest - body: - properties: - model: - type: LanguageModel - docs: The model to use for the chat completion. - system_prompt: - type: optional - docs: The system prompt to use for the chat completion. - messages: - type: list - docs: The messages to use for the chat completion. - response: ChatCompletionResponse - errors: - - commons.BadRequestError - - commons.InternalError - -types: - ChatCompletionResponse: - properties: - turns: list - citations: list - - ChatTurn: - properties: - role: string - content: string - - LanguageModel: - enum: - - name: claude_4 - value: claude-4-sonnet-20250514 - - name: command_a - value: command-a-03-2025 diff --git a/fern/apis/fai/definition/commons.yml b/fern/apis/fai/definition/commons.yml deleted file mode 100644 index a5a9fac8f..000000000 --- a/fern/apis/fai/definition/commons.yml +++ /dev/null @@ -1,16 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/fern-api/fern/main/fern.schema.json -errors: - BadRequestError: - status-code: 400 - type: string - - InternalError: - status-code: 401 - type: string - -types: - Pagination: - properties: - total: integer - page: integer - limit: integer \ No newline at end of file diff --git a/fern/apis/fai/definition/conversations.yml b/fern/apis/fai/definition/conversations.yml deleted file mode 100644 index 96e98bdfd..000000000 --- a/fern/apis/fai/definition/conversations.yml +++ /dev/null @@ -1,44 +0,0 @@ -docs: FAI Conversations API - -imports: - commons: ./commons.yml - -service: - auth: false - base-path: /conversations - endpoints: - getConversation: - docs: Retrieve a complete conversation by conversation id - path: /{domain}/{conversation_id} - method: GET - audiences: - - customers - path-parameters: - domain: string - conversation_id: string - response: Conversation - errors: - - commons.BadRequestError - - commons.InternalError - -types: - Conversation: - properties: - conversation_id: string - created_at: datetime - turns: list - - Conversations: - type: list - - ConversationSource: - default: CHAT - enum: - - CHAT - - MCP - - ConversationTurn: - properties: - role: string - text: string - created_at: datetime \ No newline at end of file diff --git a/fern/apis/fai/definition/document.yml b/fern/apis/fai/definition/document.yml deleted file mode 100644 index d9ecf9f4e..000000000 --- a/fern/apis/fai/definition/document.yml +++ /dev/null @@ -1,178 +0,0 @@ -docs: FAI Document API - -imports: - commons: ./commons.yml - -service: - auth: false - base-path: /document - endpoints: - createDocument: - docs: | - Index a document for a given domain. Documents can be used to provide additional context to Ask Fern and improve its accuracy. - path: /{domain}/create - method: POST - audiences: - - customers - path-parameters: - domain: string - request: - name: IndexDocumentRequest - body: - properties: - document: - type: string - docs: The content of the document that will be returned to Ask Fern during document retrieval. - chunk: - type: optional - docs: The textual content that should be vectorized when indexing the document. If not provided, the full document will be vectorized. - title: - type: optional - docs: The title of the document. This will be used with the `url` when Ask Fern cites this document. - url: - type: optional - docs: The url of the document. This will be used as the source of the document when Ask Fern cites it. - version: - type: optional - docs: | - The version of the document. This will be compared against when running Ask Fern with version filters. - If null, the document will be retrievable by all versions. - product: - type: optional - docs: | - The product of the document. This will be used to filter documents when running Ask Fern with product filters. - If null, the document will be retrievable by all products. - keywords: - type: optional> - docs: The keywords of the document. Adding keywords can improve document matching. - authed: - type: optional - docs: Whether the document is authed. If true, the document will be retrievable by all users. - response: DocumentIdResponse - errors: - - commons.BadRequestError - - commons.InternalError - - updateDocument: - docs: Update a document for a given domain - path: /{domain}/{document_id} - method: PATCH - audiences: - - customers - path-parameters: - domain: string - document_id: string - request: - name: UpdateDocumentRequest - body: - properties: - document: - type: optional - docs: | - The updated content of the document that will be returned to Ask Fern during document retrieval. - If not provided, this field will remain unchanged. - chunk: - type: optional - docs: | - The updated textual content that should be vectorized when indexing the document. - If not provided, this field will remain unchanged. - title: - type: optional - docs: | - The updated title of the document. If not provided, this field will remain unchanged. - url: - type: optional - docs: | - The updated url of the document. If not provided, this field will remain unchanged. - version: - type: optional - docs: | - The updated version of the document. If not provided, this field will remain unchanged. - product: - type: optional - docs: | - The updated product of the document. If not provided, this field will remain unchanged. - keywords: - type: optional> - docs: | - The updated keywords of the document. If not provided, this field will remain unchanged. - authed: - type: optional - docs: | - The updated authed status of the document. If not provided, this field will remain unchanged. - response: Document - errors: - - commons.BadRequestError - - commons.InternalError - - deleteDocumentById: - docs: Delete a document for a given domain - path: /{domain}/{document_id} - method: DELETE - audiences: - - customers - path-parameters: - domain: string - document_id: string - errors: - - commons.BadRequestError - - commons.InternalError - - getDocumentById: - docs: Get a document for a given domain - path: /{domain}/{document_id} - method: GET - audiences: - - customers - path-parameters: - domain: string - document_id: string - response: Document - errors: - - commons.BadRequestError - - commons.InternalError - - getDocuments: - docs: Retrieve all paginated documents for a given domain - path: /{domain} - method: GET - audiences: - - customers - path-parameters: - domain: - type: string - docs: The domain to retrieve documents for - request: - name: GetDocumentsRequest - query-parameters: - page: optional - limit: optional - response: DocumentList - errors: - - commons.BadRequestError - - commons.InternalError - -types: - DocumentIdResponse: - properties: - document_id: string - - Document: - properties: - document_id: string - chunk: string - domain: string - document: string - title: optional - url: optional - version: optional - product: optional - keywords: optional> - authed: optional - created_at: datetime - updated_at: datetime - - DocumentList: - properties: - documents: list - pagination: commons.Pagination diff --git a/fern/apis/fai/definition/guidance.yml b/fern/apis/fai/definition/guidance.yml deleted file mode 100644 index fd4dff991..000000000 --- a/fern/apis/fai/definition/guidance.yml +++ /dev/null @@ -1,127 +0,0 @@ -docs: FAI Guidance API - -imports: - commons: ./commons.yml - -service: - auth: false - base-path: /guidance - endpoints: - createGuidance: - docs: Index a guidance document for a given domain - path: /{domain}/create - method: POST - audiences: - - customers - path-parameters: - domain: string - request: - name: IndexGuidanceRequest - body: - properties: - context: - type: list - docs: | - The context of the guidance document, as a list of strings, that will be indexed. - Each string will be vectorized separately to generate a separate record. - document: - type: string - docs: The content of the guidance document that will be returned to Ask Fern during Ask Fern retrieval. - response: GuidanceIdResponse - errors: - - commons.BadRequestError - - commons.InternalError - - updateGuidanceById: - docs: Update a guidance document for a given domain - path: /{domain}/{guidance_id} - method: PATCH - audiences: - - customers - path-parameters: - domain: string - guidance_id: string - request: - name: UpdateGuidanceRequest - body: - properties: - context: - type: optional> - docs: | - The updated context of the guidance document, as a list of strings, that will be indexed. - If not provided, this field will remain unchanged. - document: - type: optional - docs: | - The updated content of the guidance document that will be returned to Ask Fern during Ask Fern retrieval. - If not provided, this field will remain unchanged. - response: Guidance - errors: - - commons.BadRequestError - - commons.InternalError - - deleteGuidanceById: - docs: Delete a guidance document for a given domain - path: /{domain}/{guidance_id} - method: DELETE - audiences: - - customers - path-parameters: - domain: string - guidance_id: string - errors: - - commons.BadRequestError - - commons.InternalError - - getGuidanceById: - docs: Get a guidance document for a given domain - path: /{domain}/{guidance_id} - method: GET - audiences: - - customers - path-parameters: - domain: string - guidance_id: string - response: Guidance - errors: - - commons.BadRequestError - - commons.InternalError - - getGuidances: - docs: Retrieve all paginated guidance documents for a given domain - path: /{domain} - method: GET - audiences: - - customers - path-parameters: - domain: - type: string - docs: The domain to retrieve documents for - request: - name: GetGuidancesRequest - query-parameters: - page: optional - limit: optional - response: GuidanceList - errors: - - commons.BadRequestError - - commons.InternalError - -types: - GuidanceIdResponse: - properties: - guidance_id: string - - Guidance: - properties: - guidance_id: string - context: list - domain: string - document: string - created_at: datetime - updated_at: datetime - - GuidanceList: - properties: - guidances: list - pagination: commons.Pagination diff --git a/fern/apis/fai/definition/index.yml b/fern/apis/fai/definition/index.yml deleted file mode 100644 index 748f47f25..000000000 --- a/fern/apis/fai/definition/index.yml +++ /dev/null @@ -1,111 +0,0 @@ -docs: FAI Index API - -imports: - commons: ./commons.yml - -service: - auth: false - base-path: /index - endpoints: - indexDocument: - docs: Index a document for a given domain - path: /{domain} - method: POST - audiences: - - customers - path-parameters: - domain: string - request: - name: IndexRequest - body: - properties: - index_name: - type: optional - default: custom - docs: The name of the index to which the document will be added - document_id: - type: string - docs: A unique identifier for the document - context: - type: list - docs: The context of the document, as a list of strings, that will be indexed. - document: - type: string - docs: The content of the document that will be returned in the tool response - errors: - - commons.BadRequestError - - commons.InternalError - - getDocument: - docs: Get a document for a given domain - path: /{domain} - method: GET - path-parameters: - domain: string - request: - name: GetRequest - query-parameters: - document_id: - type: string - docs: The unique identifier of the document to get - errors: - - commons.BadRequestError - - commons.InternalError - - updateDocument: - docs: Update a document for a given domain - path: /{domain}/update - method: POST - audiences: - - customers - path-parameters: - domain: string - request: - name: UpdateRequest - query-parameters: - document_id: - type: string - docs: The unique identifier of the document to update - is_active: - type: boolean - docs: Whether the document is active - context: - type: list - docs: The context of the document, as a list of strings, that will be indexed. - 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 - document: string - is_active: boolean - created_at: datetime - updated_at: datetime \ No newline at end of file diff --git a/fern/apis/fai/definition/queries.yml b/fern/apis/fai/definition/queries.yml deleted file mode 100644 index da8bd7dac..000000000 --- a/fern/apis/fai/definition/queries.yml +++ /dev/null @@ -1,78 +0,0 @@ -docs: FAI Queries API - -imports: - commons: ./commons.yml - conversations: ./conversations.yml - -service: - auth: false - base-path: / - endpoints: - createQuery: - docs: Log a new query to the FAI DB - path: /queries - method: POST - audiences: - - internal - request: - name: CreateQueryRequest - body: - properties: - query_id: string - conversation_id: string - domain: string - text: string - role: string - source: string - created_at: datetime - time_to_first_token: - type: optional - docs: Time in seconds until first token was received. Only specified for Assistant responses. - errors: - - commons.BadRequestError - - commons.InternalError - - getRecentQueries: - docs: Retrieve all paginated recent queries - path: /queries/{domain} - method: GET - audiences: - - internal - path-parameters: - domain: - type: string - docs: The domain to retrieve queries for - request: - name: GetRecentQueriesRequest - query-parameters: - page: optional - limit: optional - cutoff_time: optional - include_assistant: optional - start_date: - type: optional - docs: The start date of the period to retrieve analytics for - end_date: - type: optional - docs: The end date of the period to retrieve analytics for - response: QueryPage - errors: - - commons.BadRequestError - - commons.InternalError - -types: - Query: - properties: - query_id: string - conversation_id: string - domain: string - text: string - role: string - source: string - created_at: datetime - time_to_first_token: optional - - QueryPage: - properties: - queries: list - total: integer \ No newline at end of file diff --git a/fern/apis/fai/openapi.json b/fern/apis/fai/openapi.json new file mode 100644 index 000000000..eeb09adca --- /dev/null +++ b/fern/apis/fai/openapi.json @@ -0,0 +1,2208 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "FAI", + "summary": "The FAI API.", + "version": "0.0.0" + }, + "paths": { + "/analytics/histogram/{domain}": { + "get": { + "tags": [ + "Analytics" + ], + "summary": "Get Analytics Histogram", + "operationId": "get_analytics_histogram", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "The start date of the period to retrieve analytics for", + "title": "Start Date" + }, + "description": "The start date of the period to retrieve analytics for" + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "The end date of the period to retrieve analytics for", + "title": "End Date" + }, + "description": "The end date of the period to retrieve analytics for" + }, + { + "name": "group_by", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/GroupBy", + "description": "The field to group the analytics by", + "default": "DAY" + }, + "description": "The field to group the analytics by" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetHistogramAnalyticsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/analytics/insights/{domain}": { + "get": { + "tags": [ + "Analytics" + ], + "summary": "Get Analytics Insights", + "operationId": "get_analytics_insights", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "The start date of the period to retrieve analytics for", + "title": "Start Date" + }, + "description": "The start date of the period to retrieve analytics for" + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "The end date of the period to retrieve analytics for", + "title": "End Date" + }, + "description": "The end date of the period to retrieve analytics for" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetInsightsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/chat/{domain}": { + "post": { + "tags": [ + "Chat" + ], + "summary": "Post Chat Completion", + "operationId": "post_chat_completion", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostChatCompletionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostChatCompletionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/conversation/{domain}/{conversation_id}": { + "get": { + "tags": [ + "Conversation" + ], + "summary": "Get Conversation", + "operationId": "get_conversation", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetConversationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/document/{domain}/create": { + "post": { + "tags": [ + "Document" + ], + "summary": "Create Document", + "operationId": "create_document", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDocumentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateDocumentResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/document/{domain}/{document_id}": { + "patch": { + "tags": [ + "Document" + ], + "summary": "Update Document", + "operationId": "update_document", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Document Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDocumentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDocumentResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Document" + ], + "summary": "Delete Document By Id", + "operationId": "delete_document_by_id", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Document Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteDocumentResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "Document" + ], + "summary": "Get Document By Id", + "operationId": "get_document_by_id", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "document_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Document Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetDocumentResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/document/{domain}": { + "get": { + "tags": [ + "Document" + ], + "summary": "Get Documents", + "operationId": "get_documents", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The page number for pagination", + "title": "Page" + }, + "description": "The page number for pagination" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The number of documents per page", + "title": "Limit" + }, + "description": "The number of documents per page" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetDocumentsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/guidance/{domain}/create": { + "post": { + "tags": [ + "Guidance" + ], + "summary": "Create Guidance", + "operationId": "create_guidance", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGuidanceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateGuidanceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/guidance/{domain}/{guidance_id}": { + "patch": { + "tags": [ + "Guidance" + ], + "summary": "Update", + "operationId": "update", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "guidance_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Guidance Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGuidanceRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateGuidanceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Guidance" + ], + "summary": "Delete Guidance By Id", + "operationId": "delete_guidance_by_id", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "guidance_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Guidance Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteGuidanceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": [ + "Guidance" + ], + "summary": "Get Guidance By Id", + "operationId": "get_guidance_by_id", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "guidance_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Guidance Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetGuidanceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/guidance/{domain}": { + "get": { + "tags": [ + "Guidance" + ], + "summary": "Get Guidances", + "operationId": "get_guidances", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The page number for pagination", + "title": "Page" + }, + "description": "The page number for pagination" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The number of documents per page", + "title": "Limit" + }, + "description": "The number of documents per page" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetGuidancesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/health": { + "get": { + "tags": [ + "Health" + ], + "summary": "Health Check", + "description": "Health check endpoint that returns the application status.", + "operationId": "health_check", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/index/{domain}/reconstruct": { + "post": { + "tags": [ + "Index" + ], + "summary": "Reconstruct Query Index", + "operationId": "reconstruct_query_index", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReconstructIndexResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/index/{domain}/sync": { + "post": { + "tags": [ + "Index" + ], + "summary": "Sync Index To Query Index", + "operationId": "sync_index_to_query_index", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncIndexRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncIndexResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/queries": { + "post": { + "tags": [ + "Query" + ], + "summary": "Create Query", + "operationId": "create_query", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Query" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateQueryResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/queries/{domain}": { + "get": { + "tags": [ + "Query" + ], + "summary": "Get Recent Queries", + "operationId": "get_recent_queries", + "parameters": [ + { + "name": "domain", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Domain" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The page number for pagination", + "title": "Page" + }, + "description": "The page number for pagination" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "The number of queries per page", + "title": "Limit" + }, + "description": "The number of queries per page" + }, + { + "name": "cutoff_time", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "Only return queries after this time", + "title": "Cutoff Time" + }, + "description": "Only return queries after this time" + }, + { + "name": "include_assistant", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Whether to include assistant responses in the results", + "title": "Include Assistant" + }, + "description": "Whether to include assistant responses in the results" + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "The start date of the period to retrieve analytics for", + "title": "Start Date" + }, + "description": "The start date of the period to retrieve analytics for" + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "description": "The end date of the period to retrieve analytics for", + "title": "End Date" + }, + "description": "The end date of the period to retrieve analytics for" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetQueriesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ChatMessage": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "assistant" + ], + "title": "Role" + }, + "content": { + "type": "string", + "title": "Content" + } + }, + "type": "object", + "required": [ + "role", + "content" + ], + "title": "ChatMessage" + }, + "Conversation": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "turns": { + "items": { + "$ref": "#/components/schemas/ConversationTurn" + }, + "type": "array", + "title": "Turns" + } + }, + "type": "object", + "required": [ + "conversation_id", + "created_at", + "turns" + ], + "title": "Conversation" + }, + "ConversationTurn": { + "properties": { + "role": { + "type": "string", + "title": "Role" + }, + "text": { + "type": "string", + "title": "Text" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "role", + "text", + "created_at" + ], + "title": "ConversationTurn" + }, + "CreateDocumentRequest": { + "properties": { + "document": { + "type": "string", + "title": "Document", + "description": "The content of the document that will be returned to Ask Fern during document retrieval." + }, + "chunk": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Chunk", + "description": "The textual content that should be vectorized when indexing the document. If not provided, the full document will be vectorized." + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "The title of the document. This will be used with the `url` when Ask Fern cites this document." + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url", + "description": "The url of the document. This will be used as the source of the document when Ask Fern cites it." + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version", + "description": "The version of the document. This will be compared against when running Ask Fern with version filters. If null, the document will be retrievable by all versions." + }, + "product": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Product", + "description": "The product of the document. This will be used to filter documents when running Ask Fern with product filters. If null, the document will be retrievable by all products." + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords", + "description": "The keywords of the document. Adding keywords can improve document matching." + }, + "authed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Authed", + "description": "Whether the document is authed. If true, the document will be retrievable by all users." + } + }, + "type": "object", + "required": [ + "document" + ], + "title": "CreateDocumentRequest" + }, + "CreateDocumentResponse": { + "properties": { + "document_id": { + "type": "string", + "title": "Document Id", + "description": "The unique identifier of the created document" + } + }, + "type": "object", + "required": [ + "document_id" + ], + "title": "CreateDocumentResponse" + }, + "CreateGuidanceRequest": { + "properties": { + "context": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Context", + "description": "The context of the guidance document, as a list of strings, that will be indexed. Each string will be vectorized separately to generate a separate record." + }, + "document": { + "type": "string", + "title": "Document", + "description": "The content of the guidance document that will be returned to Ask Fern during Ask Fern retrieval." + } + }, + "type": "object", + "required": [ + "context", + "document" + ], + "title": "CreateGuidanceRequest" + }, + "CreateGuidanceResponse": { + "properties": { + "guidance_id": { + "type": "string", + "title": "Guidance Id", + "description": "The unique identifier of the created guidance document" + } + }, + "type": "object", + "required": [ + "guidance_id" + ], + "title": "CreateGuidanceResponse" + }, + "CreateQueryResponse": { + "properties": { + "query_id": { + "type": "string", + "title": "Query Id", + "description": "Unique identifier for the query" + } + }, + "type": "object", + "required": [ + "query_id" + ], + "title": "CreateQueryResponse" + }, + "DeleteDocumentResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "description": "Whether the document was successfully deleted" + } + }, + "type": "object", + "required": [ + "success" + ], + "title": "DeleteDocumentResponse" + }, + "DeleteGuidanceResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "description": "Whether the guidance document was successfully deleted" + } + }, + "type": "object", + "required": [ + "success" + ], + "title": "DeleteGuidanceResponse" + }, + "Document": { + "properties": { + "document_id": { + "type": "string", + "title": "Document Id" + }, + "domain": { + "type": "string", + "title": "Domain" + }, + "chunk": { + "type": "string", + "title": "Chunk" + }, + "document": { + "type": "string", + "title": "Document" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version" + }, + "product": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Product" + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords" + }, + "authed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Authed" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "document_id", + "domain", + "chunk", + "document", + "created_at", + "updated_at" + ], + "title": "Document" + }, + "GetConversationResponse": { + "properties": { + "conversation": { + "$ref": "#/components/schemas/Conversation", + "description": "The complete conversation with all turns" + } + }, + "type": "object", + "required": [ + "conversation" + ], + "title": "GetConversationResponse" + }, + "GetDocumentResponse": { + "properties": { + "document": { + "$ref": "#/components/schemas/Document", + "description": "The requested document" + } + }, + "type": "object", + "required": [ + "document" + ], + "title": "GetDocumentResponse" + }, + "GetDocumentsResponse": { + "properties": { + "documents": { + "items": { + "$ref": "#/components/schemas/Document" + }, + "type": "array", + "title": "Documents", + "description": "List of documents for the domain" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponse", + "description": "Pagination information for the document list" + } + }, + "type": "object", + "required": [ + "documents", + "pagination" + ], + "title": "GetDocumentsResponse" + }, + "GetGuidanceResponse": { + "properties": { + "guidance": { + "$ref": "#/components/schemas/Guidance", + "description": "The requested guidance document" + } + }, + "type": "object", + "required": [ + "guidance" + ], + "title": "GetGuidanceResponse" + }, + "GetGuidancesResponse": { + "properties": { + "guidances": { + "items": { + "$ref": "#/components/schemas/Guidance" + }, + "type": "array", + "title": "Guidances", + "description": "List of guidance documents for the domain" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponse", + "description": "Pagination information for the guidance document list" + } + }, + "type": "object", + "required": [ + "guidances", + "pagination" + ], + "title": "GetGuidancesResponse" + }, + "GetHistogramAnalyticsResponse": { + "properties": { + "bars": { + "items": { + "$ref": "#/components/schemas/HistogramAnalyticsBar" + }, + "type": "array", + "title": "Bars", + "description": "List of histogram analytics bars" + } + }, + "type": "object", + "required": [ + "bars" + ], + "title": "GetHistogramAnalyticsResponse" + }, + "GetInsightsResponse": { + "properties": { + "insights": { + "items": { + "$ref": "#/components/schemas/InsightWithCount" + }, + "type": "array", + "title": "Insights", + "description": "List of insights with query counts" + } + }, + "type": "object", + "required": [ + "insights" + ], + "title": "GetInsightsResponse" + }, + "GetQueriesResponse": { + "properties": { + "queries": { + "items": { + "$ref": "#/components/schemas/Query" + }, + "type": "array", + "title": "Queries", + "description": "List of queries matching the request criteria" + }, + "pagination": { + "$ref": "#/components/schemas/PaginationResponse", + "description": "Pagination information" + } + }, + "type": "object", + "required": [ + "queries", + "pagination" + ], + "title": "GetQueriesResponse" + }, + "GroupBy": { + "type": "string", + "enum": [ + "DAY", + "WEEK", + "MONTH" + ], + "title": "GroupBy" + }, + "Guidance": { + "properties": { + "domain": { + "type": "string", + "title": "Domain" + }, + "context": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Context" + }, + "document": { + "type": "string", + "title": "Document" + }, + "guidance_id": { + "type": "string", + "title": "Guidance Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "domain", + "context", + "document", + "guidance_id", + "created_at", + "updated_at" + ], + "title": "Guidance" + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "HistogramAnalyticsBar": { + "properties": { + "label": { + "type": "string", + "title": "Label" + }, + "queryCount": { + "type": "integer", + "title": "Querycount" + }, + "conversationCount": { + "type": "integer", + "title": "Conversationcount" + } + }, + "type": "object", + "required": [ + "label", + "queryCount", + "conversationCount" + ], + "title": "HistogramAnalyticsBar" + }, + "InsightWithCount": { + "properties": { + "insightText": { + "type": "string", + "title": "Insighttext" + }, + "examples": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Examples" + }, + "numberOfQueries": { + "type": "integer", + "title": "Numberofqueries" + } + }, + "type": "object", + "required": [ + "insightText", + "examples", + "numberOfQueries" + ], + "title": "InsightWithCount" + }, + "LanguageModel": { + "type": "string", + "enum": [ + "claude-4-sonnet-20250514", + "command-a-03-2025" + ], + "title": "LanguageModel" + }, + "PaginationResponse": { + "properties": { + "total": { + "type": "integer", + "title": "Total" + }, + "page": { + "type": "integer", + "title": "Page" + }, + "limit": { + "type": "integer", + "title": "Limit" + } + }, + "type": "object", + "required": [ + "total", + "page", + "limit" + ], + "title": "PaginationResponse" + }, + "PostChatCompletionRequest": { + "properties": { + "model": { + "anyOf": [ + { + "$ref": "#/components/schemas/LanguageModel" + }, + { + "type": "null" + } + ], + "description": "The model to use for the chat completion" + }, + "system_prompt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "System Prompt", + "description": "The system prompt to use for the chat completion" + }, + "messages": { + "items": { + "$ref": "#/components/schemas/ChatMessage" + }, + "type": "array", + "title": "Messages", + "description": "The messages to use for the chat completion" + } + }, + "type": "object", + "required": [ + "messages" + ], + "title": "PostChatCompletionRequest" + }, + "PostChatCompletionResponse": { + "properties": { + "turns": { + "items": { + "$ref": "#/components/schemas/ChatMessage" + }, + "type": "array", + "title": "Turns", + "description": "The conversation turns in the chat completion" + }, + "citations": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Citations", + "description": "List of citation strings" + } + }, + "type": "object", + "required": [ + "turns", + "citations" + ], + "title": "PostChatCompletionResponse" + }, + "Query": { + "properties": { + "query_id": { + "type": "string", + "title": "Query Id" + }, + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "domain": { + "type": "string", + "title": "Domain" + }, + "text": { + "type": "string", + "title": "Text" + }, + "role": { + "type": "string", + "title": "Role" + }, + "source": { + "type": "string", + "title": "Source" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "time_to_first_token": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Time To First Token" + } + }, + "type": "object", + "required": [ + "query_id", + "conversation_id", + "domain", + "text", + "role", + "source", + "created_at" + ], + "title": "Query" + }, + "ReconstructIndexResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "description": "Whether the query index reconstruction was successful" + } + }, + "type": "object", + "required": [ + "success" + ], + "title": "ReconstructIndexResponse" + }, + "SyncIndexRequest": { + "properties": { + "index_name": { + "type": "string", + "title": "Index Name", + "description": "The name of the index to sync" + } + }, + "type": "object", + "required": [ + "index_name" + ], + "title": "SyncIndexRequest" + }, + "SyncIndexResponse": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "description": "Whether the index sync was successful" + } + }, + "type": "object", + "required": [ + "success" + ], + "title": "SyncIndexResponse" + }, + "UpdateDocumentRequest": { + "properties": { + "document": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document", + "description": "The updated content of the document that will be returned to Ask Fern during document retrieval. If not provided, this field will remain unchanged." + }, + "chunk": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Chunk", + "description": "The updated textual content that should be vectorized when indexing the document. If not provided, this field will remain unchanged." + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "The updated title of the document. If not provided, this field will remain unchanged." + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url", + "description": "The updated url of the document. If not provided, this field will remain unchanged." + }, + "version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version", + "description": "The updated version of the document. If not provided, this field will remain unchanged." + }, + "product": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Product", + "description": "The updated product of the document. If not provided, this field will remain unchanged." + }, + "keywords": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Keywords", + "description": "The updated keywords of the document. If not provided, this field will remain unchanged." + }, + "authed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Authed", + "description": "The updated authed status of the document. If not provided, this field will remain unchanged." + } + }, + "type": "object", + "title": "UpdateDocumentRequest" + }, + "UpdateDocumentResponse": { + "properties": { + "document": { + "$ref": "#/components/schemas/Document", + "description": "The updated document" + } + }, + "type": "object", + "required": [ + "document" + ], + "title": "UpdateDocumentResponse" + }, + "UpdateGuidanceRequest": { + "properties": { + "context": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Context", + "description": "The updated context of the guidance document, as a list of strings, that will be indexed. If not provided, this field will remain unchanged." + }, + "document": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Document", + "description": "The updated content of the guidance document that will be returned to Ask Fern during Ask Fern retrieval. If not provided, this field will remain unchanged." + } + }, + "type": "object", + "title": "UpdateGuidanceRequest" + }, + "UpdateGuidanceResponse": { + "properties": { + "guidance": { + "$ref": "#/components/schemas/Guidance", + "description": "The updated guidance document" + } + }, + "type": "object", + "required": [ + "guidance" + ], + "title": "UpdateGuidanceResponse" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + } + } + }, + "servers": [ + { + "url": "https://fai.buildwithfern.com", + "x-fern-server-name": "Production" + }, + { + "url": "https://fai-dev.buildwithfern.com", + "x-fern-server-name": "Development" + }, + { + "url": "http://localhost:8080", + "x-fern-server-name": "Local" + } + ] +} \ No newline at end of file