Skip to content

Commit

Permalink
Merge pull request #550 from iceljc/master
Browse files Browse the repository at this point in the history
fix compile issue
  • Loading branch information
Oceania2018 authored Jul 17, 2024
2 parents dd36d0b + 99544f8 commit c698dba
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public async Task<List<string>> GetCollections()
return result;
}

public async Task<List<string>> Search(string collectionName, float[] vector, int limit = 5)
public async Task<List<string>> Search(string collectionName, float[] vector, string returnFieldName, int limit = 5, float confidence = 0.5f)
{
var results = _memoryStore.GetNearestMatchesAsync(collectionName, vector, limit);

Expand All @@ -48,11 +48,12 @@ public async Task<List<string>> Search(string collectionName, float[] vector, in

}

public async Task Upsert(string collectionName, string id, float[] vector, string text, Dictionary<string, string>? payload = null)
public async Task<bool> Upsert(string collectionName, string id, float[] vector, string text, Dictionary<string, string>? payload)
{
#pragma warning disable SKEXP0001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
await _memoryStore.UpsertAsync(collectionName, MemoryRecord.LocalRecord(id.ToString(), text, null, vector));
#pragma warning restore SKEXP0001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
return true;
}
}
}

0 comments on commit c698dba

Please sign in to comment.