Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SegmentInfo ¶
type SegmentInfo struct {
Label string // "prompt" | "code" | "log"
Text string // 段文本
TempPath string // 存储到 @temp 的路径(code/log),prompt 段为空
}
SegmentInfo 分类段信息,供调用方持久化。
func ClassifyAndTransform ¶
ClassifyAndTransform 对用户消息进行语义分类并转换:
- prompt 段:保留原文本
- code 段:保存到 @temp/prompt/code-{id},原文本后追加 [path:@temp/prompt/code-{id}]
- log 段:保存到 @temp/prompt/log-{id},整个替换为 [path:@temp/prompt/log-{id}]
code 和 log 段存储时不创建 Traces 记录,不会自动注入 LLM 上下文。 返回转换后的消息文本和段信息列表。
Click to show internal directories.
Click to hide internal directories.