ChunkingStrategyRequestParam class sealed

The chunking strategy used to chunk the file(s). If not set, will use the auto strategy.

Available extensions
Annotations
  • @Freezed.new(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)

Constructors

ChunkingStrategyRequestParam.auto({required String type})
Auto Chunking Strategy, the default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400.
const
factory
ChunkingStrategyRequestParam.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory
ChunkingStrategyRequestParam.static({required String type, required StaticChunkingStrategy static})
Static chunking strategy
const
factory

Properties

copyWith → $ChunkingStrategyRequestParamCopyWith<ChunkingStrategyRequestParam>
Create a copy of ChunkingStrategyRequestParam with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
Always auto.
no setterinherited

Methods

map<TResult extends Object?>({required TResult auto(AutoChunkingStrategyRequestParam value), required TResult static(StaticChunkingStrategyRequestParam value)}) → TResult

Available on ChunkingStrategyRequestParam, provided by the ChunkingStrategyRequestParamPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>({TResult? auto(AutoChunkingStrategyRequestParam value)?, TResult? static(StaticChunkingStrategyRequestParam value)?}) → TResult?

Available on ChunkingStrategyRequestParam, provided by the ChunkingStrategyRequestParamPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>({TResult auto(AutoChunkingStrategyRequestParam value)?, TResult static(StaticChunkingStrategyRequestParam value)?, required TResult orElse()}) → TResult

Available on ChunkingStrategyRequestParam, provided by the ChunkingStrategyRequestParamPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>({TResult auto(String type)?, TResult static(String type, StaticChunkingStrategy static)?, required TResult orElse()}) → TResult

Available on ChunkingStrategyRequestParam, provided by the ChunkingStrategyRequestParamPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this ChunkingStrategyRequestParam to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult auto(String type), required TResult static(String type, StaticChunkingStrategy static)}) → TResult

Available on ChunkingStrategyRequestParam, provided by the ChunkingStrategyRequestParamPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>({TResult? auto(String type)?, TResult? static(String type, StaticChunkingStrategy static)?}) → TResult?

Available on ChunkingStrategyRequestParam, provided by the ChunkingStrategyRequestParamPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited