mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
fix(ai): harden cross-chat analysis results
Resolve private ranking display names, apply privacy preprocessing consistently across cached recaps and structural labels, and bound model-visible overview payloads to the configured tool budget.
This commit is contained in:
1 parent
05d9b34f30
commit
f9ba12e535
12 files changed
+952
-34
No files matched your search
@@ -4,7 +4,12 @@ import type {
|
||||
PreprocessConfig,
|
||||
SessionRuntimeAdapter,
|
||||
} from '@openchatlab/node-runtime'
|
||||
import { countTokens, preprocessCrossChatMessages } from '@openchatlab/node-runtime'
|
||||
import {
|
||||
countTokens,
|
||||
preprocessCrossChatLabel,
|
||||
preprocessCrossChatMessages,
|
||||
preprocessCrossChatSummaries,
|
||||
} from '@openchatlab/node-runtime'
|
||||
import { createCrossChatAgentToolAdapters, type CrossChatToolExecutionContext } from '@openchatlab/tools'
|
||||
|
||||
export function createCliCrossChatTools(options: {
|
||||
@@ -26,6 +31,15 @@ export function createCliCrossChatTools(options: {
|
||||
messages,
|
||||
options.preprocessConfig as PreprocessConfig | undefined
|
||||
),
|
||||
preprocessSummariesBySession: (sessionId, summaries) =>
|
||||
preprocessCrossChatSummaries(
|
||||
options.sessionAdapter,
|
||||
sessionId,
|
||||
summaries,
|
||||
options.preprocessConfig as PreprocessConfig | undefined
|
||||
),
|
||||
preprocessModelLabel: (value, pseudonym) =>
|
||||
preprocessCrossChatLabel(value, pseudonym, options.preprocessConfig as PreprocessConfig | undefined),
|
||||
}
|
||||
|
||||
return createCrossChatAgentToolAdapters(context) as AgentTool<any, any>[]
|
||||
|
||||
Reference in new issue
Block a user