MCPcopy Create free account
hub / github.com/astercloud/aster / PromptCompressor

Struct PromptCompressor

pkg/agent/prompt_optimizer.go:573–576  ·  view source on GitHub ↗

PromptCompressor Prompt 压缩器(使用 LLM 进行智能压缩)

Source from the content-addressed store, hash-verified

571
572// PromptCompressor Prompt 压缩器(使用 LLM 进行智能压缩)
573type PromptCompressor struct {
574 TargetLength int
575 PreserveSections []string // 需要保留的段落标题
576}
577
578// Compress 压缩 Prompt(简化版,实际可以使用 LLM)
579func (pc *PromptCompressor) Compress(prompt string) string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected