Updated the documentation to include the new API endpoints.

This commit is contained in:
ilya-kolchinsky 2025-03-11 14:56:21 +01:00
parent ad4cf97604
commit 9305b4157e
2 changed files with 850 additions and 0 deletions

View file

@ -879,6 +879,59 @@ paths:
required: true
schema:
type: string
/v1/preprocessors/{preprocessor_id}:
get:
responses:
'200':
description: OK
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/Preprocessor'
- type: 'null'
'400':
$ref: '#/components/responses/BadRequest400'
'429':
$ref: >-
#/components/responses/TooManyRequests429
'500':
$ref: >-
#/components/responses/InternalServerError500
default:
$ref: '#/components/responses/DefaultError'
tags:
- Preprocessors
description: ''
parameters:
- name: preprocessor_id
in: path
required: true
schema:
type: string
delete:
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/BadRequest400'
'429':
$ref: >-
#/components/responses/TooManyRequests429
'500':
$ref: >-
#/components/responses/InternalServerError500
default:
$ref: '#/components/responses/DefaultError'
tags:
- Preprocessors
description: ''
parameters:
- name: preprocessor_id
in: path
required: true
schema:
type: string
/v1/scoring-functions/{scoring_fn_id}:
get:
responses:
@ -1702,6 +1755,57 @@ paths:
schema:
$ref: '#/components/schemas/RegisterModelRequest'
required: true
/v1/preprocessors:
get:
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ListPreprocessorsResponse'
'400':
$ref: '#/components/responses/BadRequest400'
'429':
$ref: >-
#/components/responses/TooManyRequests429
'500':
$ref: >-
#/components/responses/InternalServerError500
default:
$ref: '#/components/responses/DefaultError'
tags:
- Preprocessors
description: ''
parameters: []
post:
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Preprocessor'
'400':
$ref: '#/components/responses/BadRequest400'
'429':
$ref: >-
#/components/responses/TooManyRequests429
'500':
$ref: >-
#/components/responses/InternalServerError500
default:
$ref: '#/components/responses/DefaultError'
tags:
- Preprocessors
description: ''
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterPreprocessorRequest'
required: true
/v1/inspect/providers:
get:
responses:
@ -2059,6 +2163,35 @@ paths:
schema:
$ref: '#/components/schemas/PreferenceOptimizeRequest'
required: true
/v1/preprocess:
post:
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PreprocessorResponse'
'400':
$ref: '#/components/responses/BadRequest400'
'429':
$ref: >-
#/components/responses/TooManyRequests429
'500':
$ref: >-
#/components/responses/InternalServerError500
default:
$ref: '#/components/responses/DefaultError'
tags:
- Preprocessing
description: ''
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PreprocessRequest'
required: true
/v1/tool-runtime/rag-tool/query:
post:
responses:
@ -3133,6 +3266,10 @@ components:
CompletionResponse:
type: object
properties:
metrics:
type: array
items:
$ref: '#/components/schemas/MetricEvent'
content:
type: string
description: The generated completion text
@ -3451,6 +3588,10 @@ components:
CompletionResponseStreamChunk:
type: object
properties:
metrics:
type: array
items:
$ref: '#/components/schemas/MetricEvent'
delta:
type: string
description: >-
@ -4846,6 +4987,36 @@ components:
- llm
- embedding
title: ModelType
Preprocessor:
type: object
properties:
identifier:
type: string
provider_resource_id:
type: string
provider_id:
type: string
type:
type: string
const: preprocessor
default: preprocessor
metadata:
type: object
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
additionalProperties: false
required:
- identifier
- provider_resource_id
- provider_id
- type
title: Preprocessor
PaginatedRowsResult:
type: object
properties:
@ -5260,6 +5431,25 @@ components:
required:
- status
title: HealthInfo
PreprocessorChainElement:
type: object
properties:
preprocessor_id:
type: string
options:
type: object
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
additionalProperties: false
required:
- preprocessor_id
title: PreprocessorChainElement
RAGDocument:
type: object
properties:
@ -5302,6 +5492,10 @@ components:
type: string
chunk_size_in_tokens:
type: integer
preprocessor_chain:
type: array
items:
$ref: '#/components/schemas/PreprocessorChainElement'
additionalProperties: false
required:
- documents
@ -5455,6 +5649,17 @@ components:
required:
- data
title: ListModelsResponse
ListPreprocessorsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Preprocessor'
additionalProperties: false
required:
- data
title: ListPreprocessorsResponse
ProviderInfo:
type: object
properties:
@ -5875,6 +6080,103 @@ components:
required:
- job_uuid
title: PostTrainingJob
PreprocessingDataElement:
type: object
properties:
data_element_id:
type: string
data_element_type:
type: string
enum:
- document_uri
- document_directory_uri
- binary_document
- raw_text_document
- chunks
title: PreprocessingDataType
data_element_format:
type: string
enum:
- pdf
- docx
- xlsx
- pptx
- md
- json
- html
- csv
- txt
title: PreprocessingDataFormat
data_element_path_or_content:
oneOf:
- type: string
- $ref: '#/components/schemas/InterleavedContentItem'
- type: array
items:
$ref: '#/components/schemas/InterleavedContentItem'
- $ref: '#/components/schemas/URL'
- type: object
properties:
content:
$ref: '#/components/schemas/InterleavedContent'
metadata:
type: object
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
additionalProperties: false
required:
- content
- metadata
title: Chunk
additionalProperties: false
required:
- data_element_id
title: PreprocessingDataElement
PreprocessRequest:
type: object
properties:
preprocessors:
type: array
items:
$ref: '#/components/schemas/PreprocessorChainElement'
preprocessor_inputs:
type: array
items:
$ref: '#/components/schemas/PreprocessingDataElement'
additionalProperties: false
required:
- preprocessors
- preprocessor_inputs
title: PreprocessRequest
PreprocessorResponse:
type: object
properties:
success:
type: boolean
output_data_type:
type: string
enum:
- document_uri
- document_directory_uri
- binary_document
- raw_text_document
- chunks
title: PreprocessingDataType
results:
type: array
items:
$ref: '#/components/schemas/PreprocessingDataElement'
additionalProperties: false
required:
- success
- output_data_type
title: PreprocessorResponse
DefaultRAGQueryGeneratorConfig:
type: object
properties:
@ -6197,6 +6499,27 @@ components:
required:
- model_id
title: RegisterModelRequest
RegisterPreprocessorRequest:
type: object
properties:
preprocessor_id:
type: string
provider_id:
type: string
metadata:
type: object
additionalProperties:
oneOf:
- type: 'null'
- type: boolean
- type: number
- type: string
- type: array
- type: object
additionalProperties: false
required:
- preprocessor_id
title: RegisterPreprocessorRequest
RegisterScoringFunctionRequest:
type: object
properties:
@ -6707,6 +7030,8 @@ tags:
- name: Inspect
- name: Models
- name: PostTraining (Coming Soon)
- name: Preprocessing
- name: Preprocessors
- name: Safety
- name: Scoring
- name: ScoringFunctions
@ -6731,6 +7056,8 @@ x-tagGroups:
- Inspect
- Models
- PostTraining (Coming Soon)
- Preprocessing
- Preprocessors
- Safety
- Scoring
- ScoringFunctions