memory isolation fix
This commit is contained in:
@@ -64,7 +64,7 @@ async function embedEntity(entity) {
|
||||
return data.embedding;
|
||||
}
|
||||
|
||||
async function extractAndStoreEntities(userMessage, aiResponse) {
|
||||
async function extractAndStoreEntities(userMessage, aiResponse, projectId=null) {
|
||||
console.log('[entities] Extraction triggered')
|
||||
try {
|
||||
// Fetch existing entities to guide the model toward consistent name/type pairs
|
||||
@@ -109,6 +109,7 @@ async function extractAndStoreEntities(userMessage, aiResponse) {
|
||||
name: entity.name,
|
||||
type: entity.type,
|
||||
notes: entity.notes,
|
||||
projectId: projectId ?? null,
|
||||
}))
|
||||
.catch(err => {
|
||||
console.warn(`[entities] Failed to embed entity "${entity.name}":`, err.message);
|
||||
|
||||
Reference in New Issue
Block a user