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

@ -1293,6 +1293,88 @@
]
}
},
"/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": {
@ -2527,6 +2609,80 @@
}
}
},
"/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": {
@ -3046,6 +3202,49 @@
}
}
},
"/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": {
@ -4600,6 +4799,12 @@
"CompletionResponse": {
"type": "object",
"properties": {
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricEvent"
}
},
"content": {
"type": "string",
"description": "The generated completion text"
@ -4967,6 +5172,12 @@
"CompletionResponseStreamChunk": {
"type": "object",
"properties": {
"metrics": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MetricEvent"
}
},
"delta": {
"type": "string",
"description": "New content generated since last chunk. This can be one or more tokens."
@ -7023,6 +7234,58 @@
],
"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": {
@ -7679,6 +7942,44 @@
],
"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": {
@ -7755,6 +8056,12 @@
},
"chunk_size_in_tokens": {
"type": "integer"
},
"preprocessor_chain": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PreprocessorChainElement"
}
}
},
"additionalProperties": false,
@ -8004,6 +8311,22 @@
],
"title": "ListModelsResponse"
},
"ListPreprocessorsResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Preprocessor"
}
}
},
"additionalProperties": false,
"required": [
"data"
],
"title": "ListPreprocessorsResponse"
},
"ProviderInfo": {
"type": "object",
"properties": {
@ -8637,6 +8960,157 @@
],
"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": {
@ -9172,6 +9646,47 @@
],
"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": {
@ -9966,6 +10481,12 @@
{
"name": "PostTraining (Coming Soon)"
},
{
"name": "Preprocessing"
},
{
"name": "Preprocessors"
},
{
"name": "Safety"
},
@ -10012,6 +10533,8 @@
"Inspect",
"Models",
"PostTraining (Coming Soon)",
"Preprocessing",
"Preprocessors",
"Safety",
"Scoring",
"ScoringFunctions",