Last active
September 20, 2023 10:21
-
-
Save Barqawiz/2e489ef68604fb5203723e213b902e21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { SemanticSearch } = require('intellinode'); | |
// apikey from openai.com | |
const search = new SemanticSearch(apiKey); | |
// pivotItem is the item to search. | |
// searchArray is the array of strings to search through. | |
const results = await search.getTopMatches(pivotItem, searchArray, numberOfMatches); | |
const filteredArray = search.filterTopMatches(results, searchArray) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment