memory isolation fix
This commit is contained in:
@@ -33,9 +33,15 @@ async function searchEpisodes( vector, {limit = ORCHESTRATION.RECENT_EPISODE_LIM
|
||||
return data.result;
|
||||
}
|
||||
|
||||
async function searchEntities(vector, { limit = 5, scoreThreshold = 0.6 } = {}) {
|
||||
async function searchEntities(vector, { limit = ORCHESTRATION.ENTITIES_LIMIT, scoreThreshold = ORCHESTRATION.ENTITIES_THRESHOLD, projectId = undefined } = {}) {
|
||||
const body = { vector, limit, score_threshold: scoreThreshold, with_payload: true };
|
||||
|
||||
if (projectId !== undefined) {
|
||||
body.filter = {
|
||||
must: [{ key: 'projectId', match: { value: projectId ?? null } }]
|
||||
};
|
||||
}
|
||||
|
||||
const res = await fetch(
|
||||
`${BASE_URL}/collections/${COLLECTIONS.ENTITIES}/points/search`,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user