ingestTextV1IngestTextPostWithHttpInfo method
Ingest Text
Ingests and processes a text, storing its chunks to be used as context. The context obtained from files is later used in /chat/completions, /completions, and /chunks APIs. A Document will be generated with the given text. The Document ID is returned in the response, together with the extracted Metadata (which is later used to improve context retrieval). That ID can be used to filter the context used to create responses in /chat/completions, /completions, and /chunks APIs.
Note: This method returns the HTTP Response.
Parameters:
- IngestTextBody ingestTextBody (required):
Implementation
Future<Response> ingestTextV1IngestTextPostWithHttpInfo(IngestTextBody ingestTextBody,) async {
// ignore: prefer_const_declarations
final path = r'/v1/ingest/text';
// ignore: prefer_final_locals
Object? postBody = ingestTextBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}