from chunkr_ai import Chunkr
from chunkr_ai.models import (
Configuration,
GenerationConfig,
GenerationStrategy,
SegmentProcessing,
SegmentFormat
)
chunkr = Chunkr()
config = Configuration(
segment_processing=SegmentProcessing(
Table=GenerationConfig(
format=SegmentFormat.MARKDOWN,
strategy=GenerationStrategy.LLM,
extended_context=True
),
Picture=GenerationConfig(
format=SegmentFormat.HTML,
strategy=GenerationStrategy.LLM,
extended_context=True
),
Formula=GenerationConfig(
format=SegmentFormat.MARKDOWN,
strategy=GenerationStrategy.LLM,
extended_context=True
)
)
)
chunkr.upload("path/to/file", config)