feat(llm 對話): 新增 prompt builder 與 few-shot 範例組裝,強化 Claude 對話品質

This commit is contained in:
Jeffery
2026-08-14 12:44:48 +08:00
parent 6ce7b2e800
commit 30719a2960
6 changed files with 187 additions and 12 deletions
@@ -44,7 +44,7 @@ export class ContextAssemblerService {
? []
: await this.retriever.retrieve(characterId, userInput, { relatedUserId: userId });
const history = this.workingMemory.getContext(sessionId).map((entry) => ({
const history = (await this.workingMemory.getContext(sessionId)).map((entry) => ({
role: entry.role,
content: entry.content,
timestamp: entry.timestamp.toISOString(),