LLM for Unity
v2.3.0
Create characters in Unity with LLMs!
|
Class implementing the search plugin template used e.g. in chunking. More...
Public Member Functions | |
void | SetSearch (SearchMethod search) |
Sets the search method of the plugin. | |
Public Member Functions inherited from LLMUnity.Searchable | |
string | Get (int key) |
Retrieves the phrase with the specific id. | |
Task< int > | Add (string inputString, string group="") |
Adds a phrase to the search. | |
int | Remove (string inputString, string group="") |
Removes a phrase from the search. | |
void | Remove (int key) |
Removes a phrase from the search. | |
int | Count () |
Returns a count of the phrases. | |
int | Count (string group) |
Returns a count of the phrases in a specific data group. | |
void | Clear () |
Clears the search object. | |
Task< int > | IncrementalSearch (string queryString, string group="") |
Allows to do search and retrieve results in batches (incremental search). | |
ValueTuple< int[], float[], bool > | IncrementalFetchKeys (int fetchKey, int k) |
Retrieves the most similar search results in batches (incremental search). The phrase keys and distances are retrieved, as well as a parameter that dictates whether the search is exhausted. | |
void | IncrementalSearchComplete (int fetchKey) |
Completes the search and clears the cached results for an incremental search. | |
async Task<(string[], float[])> | Search (string queryString, int k, string group="") |
Search for similar results to the provided query. The most similar results and their distances (dissimilarity) to the query are retrieved. | |
virtual ValueTuple< string[], float[], bool > | IncrementalFetch (int fetchKey, int k) |
Retrieves the most similar search results in batches (incremental search). The most similar results and their distances (dissimilarity) to the query are retrieved as well as a parameter that dictates whether the search is exhausted. | |
void | Save (string filePath) |
Saves the state of the search object. | |
async Task< bool > | Load (string filePath) |
Loads the state of the search object. | |
Class implementing the search plugin template used e.g. in chunking.
|
inline |