- 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
18 lines
435 B
Go
18 lines
435 B
Go
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)
|
|
}
|