优化器

Optimization.

class llama_index.optimization.SentenceEmbeddingOptimizer(embed_model: Optional[BaseEmbedding] = None, percentile_cutoff: Optional[float] = None, threshold_cutoff: Optional[float] = None, tokenizer_fn: Optional[Callable[[str], List[str]]] = None)

Optimization of a text chunk given the query by shortening the input text.

optimize(query_bundle: QueryBundle, text: str) str

Optimize a text chunk given the query by shortening the input text.