OutputResponse, which contains a list of chunks. Each chunk is a collection of one or more segments.
The grouping of segments into chunks depends on the target_chunk_length parameter. Click here to learn more about how to configure it.
Output Response
TheOutputResponse struct is the main output of a task. It is defined as:
- chunks: This is a vector of
Chunkobjects, representing the output of a task. - extracted_json: This is an optional field that may contain additional extracted JSON data.
Chunk Model
TheChunk model represents a collection of segments. It consists of:
- segments: This is a vector of
Segmentobjects that make up the chunk. - chunk_length: This is an integer representing the actual length of the chunk, i.e., the number of words in the chunk. This may differ from the
target_chunk_lengthas segments are not split into smaller segments.
Segments
This will contain an array of segments that make up the chunk.Chunk Length
This will contain the actual length of the chunk, i.e., the number of words in the chunk. This may be different from thetarget_chunk_length as the segments are not split into smaller segments.