ResourceAdditionRequestChunkingConfiguration¶
- pydantic model openapi_client.models.resource_addition_request_chunking_configuration.ResourceAdditionRequestChunkingConfiguration¶
Optional chunking config for unstructured knowledge bases. Defaults to ChunkingStrategy NONE if omitted. Ignored for structured knowledge bases. Only strategy-specific fields for the chosen ChunkingStrategy are allowed.
- Fields:
- field chunking_strategy: Optional[StrictStr] = 'NONE' (alias 'ChunkingStrategy')¶
Chunking strategy. Defaults to NONE if omitted.
- field max_tokens: Optional[Annotated[int, Field(strict=True, ge=1)]] = None (alias 'MaxTokens')¶
Max tokens for FIXED_SIZE or SEMANTIC chunking. Default 300. Must be an integer >= 1.
- field overlap_percentage: Optional[Annotated[int, Field(le=99, strict=True, ge=1)]] = None (alias 'OverlapPercentage')¶
Overlap percentage for FIXED_SIZE chunking. Default 10. Range 1-99.
- field max_token_layer2: Optional[Annotated[int, Field(le=8192, strict=True, ge=1)]] = None (alias 'MaxTokenLayer2')¶
Max tokens for hierarchical layer 2. Default 300. Range 1-8192. Must be less than or equal to MaxTokenLayer1.
- field max_token_layer1: Optional[Annotated[int, Field(le=8192, strict=True, ge=1)]] = None (alias 'MaxTokenLayer1')¶
Max tokens for hierarchical layer 1. Default 512. Range 1-8192. Must be greater than or equal to MaxTokenLayer2.
- field overlap_tokens: Optional[Annotated[int, Field(strict=True, ge=1)]] = None (alias 'OverlapTokens')¶
Overlap tokens for hierarchical chunking. Default 10. Must be >= 1 and less than or equal to MaxTokenLayer2.
- field buffer_size: Optional[StrictInt] = None (alias 'BufferSize')¶
Buffer size for SEMANTIC chunking. Default 1.
- field breakpoint_percentile_threshold: Optional[Annotated[int, Field(le=99, strict=True, ge=50)]] = None (alias 'BreakpointPercentileThreshold')¶
Breakpoint percentile for SEMANTIC chunking. Default 95. Range 50-99.
- to_str()¶
Returns the string representation of the model using alias
- Return type:
str
- to_json()¶
Returns the JSON representation of the model using alias
- Return type:
str
- classmethod from_json(json_str)¶
Create an instance of ResourceAdditionRequestChunkingConfiguration from a JSON string
- Return type:
Optional[Self]
- to_dict()¶
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- Return type:
Dict[str,Any]
- classmethod from_dict(obj)¶
Create an instance of ResourceAdditionRequestChunkingConfiguration from a dict
- Return type:
Optional[Self]