Skip to content

Commit

Permalink
Update demoSearch.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
berkingurcan committed Jul 3, 2024
1 parent 9290194 commit 0e11b7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tools/demoSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ async function formatResults(matches: ScoredPineconeRecord[]) {
return results.join('\n')
}

const runTool = (message_content:string) => async (args: { }): Promise<string>=> {
const runTool = (message_content: string) => async (args: { query: string }): Promise<string> => {
try {
const embeddings = await getEmbeddings(message_content)
const matches = await getMatchesFromEmbeddings(embeddings, 15, VECTOR_TYPE)

return formatResults(matches)
} catch (e) {
console.log('Error fetching docs: ', e)
Expand Down

0 comments on commit 0e11b7a

Please sign in to comment.