Files
memoryweave/plugins/openclaw-zhiyi/dist/client.d.ts
T
xiaowei 2a350cf781 fix(distill): max_tokens 800→1200 — Agnes推理token预算不足
Agnes 2.0-flash是推理模型,推理token占大量预算。
800仍不够→JSON截断(parse error: unexpected end of JSON input)。
1200确保推理+正文都够用。
2026-08-20 01:13:06 +08:00

33 lines
1.3 KiB
TypeScript

import type { ZhiYiMemoryConfig, RecallResult, CommitResult, SearchNotesResult, GraphPath, StatsResult, FeedbackResult } from './types';
export declare class ZhiYiClient {
private client;
private ns;
private agentId;
private config;
/** LRU prefetch cache: session key → results */
private cache;
private readonly MAX_CACHE;
constructor(config: ZhiYiMemoryConfig);
health(): Promise<boolean>;
commit(content: string, category?: string, metadata?: Record<string, unknown>): Promise<CommitResult | null>;
batchCommit(items: Array<{
content: string;
category?: string;
metadata?: Record<string, unknown>;
}>, concurrency?: number): Promise<{
ok: number;
fail: number;
errors: string[];
}>;
recall(query: string, topK?: number): Promise<RecallResult[]>;
prefetch(context?: string): Promise<RecallResult[]>;
clearCache(): void;
markUseful(memoryId: string): Promise<FeedbackResult>;
markNotUseful(memoryId: string, reason?: string): Promise<FeedbackResult>;
forget(memoryId: string): Promise<FeedbackResult>;
searchNotes(entity: string, maxHops?: number, maxNotes?: number): Promise<SearchNotesResult[]>;
navigate(entity: string, maxHops?: number): Promise<GraphPath[]>;
stats(): Promise<StatsResult>;
private _log;
}