feat(memory): add LLM-driven memory extraction from conversations
- memory/extractor: async LLM-based memory extraction from chat history - Parses JSON lines from LLM response as memory entries - Wire into orchestrator pipeline via PostProcess hook - Non-blocking: runs in goroutine with 30s timeout - Automatic dedup via existing keyword overlap logic
This commit is contained in:
1 parent
886fcf2216
commit
47047c903c
5 files changed
+263
-6
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package memory
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.yeij.top/AskaEth/Cyrene_v2/services/ai-core/llm"
|
||||
"git.yeij.top/AskaEth/Cyrene_v2/services/ai-core/model"
|
||||
)
|
||||
|
||||
// LLMAdapterBridge adapts llm.Adapter to LLMClient for memory extraction.
|
||||
type LLMAdapterBridge struct {
|
||||
Adapter *llm.Adapter
|
||||
}
|
||||
|
||||
func (b *LLMAdapterBridge) Chat(ctx context.Context, messages []model.LLMMessage) (*model.LLMResponse, error) {
|
||||
return b.Adapter.Chat(ctx, messages)
|
||||
}
|
||||
Reference in new issue
Block a user