refac: queryVectorDB renamed to queryCollection

This commit is contained in:
Timothy J. Baek 2024-02-02 22:57:18 -08:00
parent 50f7b20ac2
commit 1d0eaec37e
3 changed files with 39 additions and 43 deletions

View file

@ -66,13 +66,13 @@ export const uploadWebToVectorDB = async (token: string, collection_name: string
export const queryVectorDB = async (
token: string,
collection_names: string[],
collection_name: string,
query: string,
k: number
) => {
let error = null;
const res = await fetch(`${RAG_API_BASE_URL}/query/collections`, {
const res = await fetch(`${RAG_API_BASE_URL}/query/collection`, {
method: 'POST',
headers: {
Accept: 'application/json',
@ -80,7 +80,7 @@ export const queryVectorDB = async (
authorization: `Bearer ${token}`
},
body: JSON.stringify({
collection_names: collection_names,
collection_name: collection_name,
query: query,
k: k
})