The type of encoder.
Information about an encoder.
A route choice typically output by the routers.
A message in a conversation, includes the role and content fields.
Convert the message to an OpenAI-compatible format.
Convert the message to a Cohere-compatible format.
Convert the message to a LlamaCPP-compatible format.
Convert the message to a Mistral-compatible format.
Convert the message to a Voyage-compatible format.
Convert the message to a Jina-compatible format.
Convert the message to a string.
A configuration parameter for a route. Used for remote router metadata such as router hashes, sync locks, etc.
Convert the configuration parameter to a Pinecone-compatible format. Should
be used when upserting configuration parameters to a separate config namespace within your Pinecone index.
Arguments:
dimensions
(int
): The dimensions of the Pinecone index.Returns:
dict
: A Pinecone-compatible configuration parameter.
An utterance in a conversation, includes the route, utterance, function schemas, metadata, and diff tag.
Create an Utterance object from a tuple. The tuple must contain
route and utterance as the first two elements. Then optionally function schemas and metadata as the third and fourth elements respectively. If this order is not followed an invalid Utterance object will be returned.
Arguments:
tuple_obj
(Tuple
): A tuple containing route, utterance, function schemas and metadata.Returns:
Utterance
: An Utterance object.
Convert an Utterance object to a tuple.
Returns:
Tuple
: A tuple containing (route, utterance, function schemas, metadata).
Convert an Utterance object to a string. Used for comparisons during sync
check operations.
Arguments:
include_metadata
(bool
): Whether to include metadata in the string.Returns:
str
: A string representation of the Utterance object.
Synchronization modes for local (route layer) and remote (index) instances.
A list of Utterance objects that represent the differences between local and remote utterances.
Create a UtteranceDiff object from two lists of Utterance objects.
Arguments:
local_utterances
(List[Utterance]
): A list of Utterance objects.remote_utterances
(List[Utterance]
): A list of Utterance objects.Outputs the utterance diff as a list of diff strings. Returns a list
of strings showing what is different in the remote when compared to the local. For example:
[” route1: utterance1”, ” route1: utterance2”, ”- route2: utterance3”, ”- route2: utterance4”]
Tells us that the remote is missing “route2: utterance3” and “route2: utterance4”, which do exist locally. If we see:
[” route1: utterance1”, ” route1: utterance2”, ”+ route2: utterance3”, ”+ route2: utterance4”]
This diff tells us that the remote has “route2: utterance3” and “route2: utterance4”, which do not exist locally.
Arguments:
include_metadata
(bool
): Whether to include metadata in the string.Returns:
List[str]
: A list of diff strings.
Get all utterances with a given diff tag.
Arguments:
diff_tag
(str
): The diff tag to filter by. Must be one of ”+”, ”-”, or ” ”.Returns:
List[Utterance]
: A list of Utterance objects.
Generates the optimal synchronization plan for local and remote instances.
Arguments:
sync_mode
(str
): The mode to sync the routes with the remote index.Returns:
dict
: A dictionary describing the synchronization strategy.
The metric to use in vector-based similarity search indexes.
Sparse embedding interface. Primarily uses numpy operations for faster operations.
Create a SparseEmbedding object from a compact array.
Arguments:
array
(np.ndarray
): A compact array.Returns:
SparseEmbedding
: A SparseEmbedding object.
Consumes an array of sparse vectors containing zero-values.
Arguments:
vector
(np.ndarray
): A sparse vector.Returns:
SparseEmbedding
: A SparseEmbedding object.
Create a SparseEmbedding object from an AurelioSparseEmbedding object.
Arguments:
embedding
(BM25SparseEmbedding
): An AurelioSparseEmbedding object.Returns:
SparseEmbedding
: A SparseEmbedding object.
Create a SparseEmbedding object from a dictionary.
Arguments:
sparse_dict
(dict
): A dictionary of sparse values.Returns:
SparseEmbedding
: A SparseEmbedding object.
Create a SparseEmbedding object from a Pinecone dictionary.
Arguments:
sparse_dict
(dict
): A Pinecone dictionary.Returns:
SparseEmbedding
: A SparseEmbedding object.
Convert a SparseEmbedding object to a dictionary.
Returns:
dict
: A dictionary of sparse values.
Convert a SparseEmbedding object to a Pinecone dictionary.
Returns:
dict
: A Pinecone dictionary.
Return a list of (index, value) tuples from the SparseEmbedding object.
Returns:
list
: A list of (index, value) tuples.
The type of encoder.
Information about an encoder.
A route choice typically output by the routers.
A message in a conversation, includes the role and content fields.
Convert the message to an OpenAI-compatible format.
Convert the message to a Cohere-compatible format.
Convert the message to a LlamaCPP-compatible format.
Convert the message to a Mistral-compatible format.
Convert the message to a Voyage-compatible format.
Convert the message to a Jina-compatible format.
Convert the message to a string.
A configuration parameter for a route. Used for remote router metadata such as router hashes, sync locks, etc.
Convert the configuration parameter to a Pinecone-compatible format. Should
be used when upserting configuration parameters to a separate config namespace within your Pinecone index.
Arguments:
dimensions
(int
): The dimensions of the Pinecone index.Returns:
dict
: A Pinecone-compatible configuration parameter.
An utterance in a conversation, includes the route, utterance, function schemas, metadata, and diff tag.
Create an Utterance object from a tuple. The tuple must contain
route and utterance as the first two elements. Then optionally function schemas and metadata as the third and fourth elements respectively. If this order is not followed an invalid Utterance object will be returned.
Arguments:
tuple_obj
(Tuple
): A tuple containing route, utterance, function schemas and metadata.Returns:
Utterance
: An Utterance object.
Convert an Utterance object to a tuple.
Returns:
Tuple
: A tuple containing (route, utterance, function schemas, metadata).
Convert an Utterance object to a string. Used for comparisons during sync
check operations.
Arguments:
include_metadata
(bool
): Whether to include metadata in the string.Returns:
str
: A string representation of the Utterance object.
Synchronization modes for local (route layer) and remote (index) instances.
A list of Utterance objects that represent the differences between local and remote utterances.
Create a UtteranceDiff object from two lists of Utterance objects.
Arguments:
local_utterances
(List[Utterance]
): A list of Utterance objects.remote_utterances
(List[Utterance]
): A list of Utterance objects.Outputs the utterance diff as a list of diff strings. Returns a list
of strings showing what is different in the remote when compared to the local. For example:
[” route1: utterance1”, ” route1: utterance2”, ”- route2: utterance3”, ”- route2: utterance4”]
Tells us that the remote is missing “route2: utterance3” and “route2: utterance4”, which do exist locally. If we see:
[” route1: utterance1”, ” route1: utterance2”, ”+ route2: utterance3”, ”+ route2: utterance4”]
This diff tells us that the remote has “route2: utterance3” and “route2: utterance4”, which do not exist locally.
Arguments:
include_metadata
(bool
): Whether to include metadata in the string.Returns:
List[str]
: A list of diff strings.
Get all utterances with a given diff tag.
Arguments:
diff_tag
(str
): The diff tag to filter by. Must be one of ”+”, ”-”, or ” ”.Returns:
List[Utterance]
: A list of Utterance objects.
Generates the optimal synchronization plan for local and remote instances.
Arguments:
sync_mode
(str
): The mode to sync the routes with the remote index.Returns:
dict
: A dictionary describing the synchronization strategy.
The metric to use in vector-based similarity search indexes.
Sparse embedding interface. Primarily uses numpy operations for faster operations.
Create a SparseEmbedding object from a compact array.
Arguments:
array
(np.ndarray
): A compact array.Returns:
SparseEmbedding
: A SparseEmbedding object.
Consumes an array of sparse vectors containing zero-values.
Arguments:
vector
(np.ndarray
): A sparse vector.Returns:
SparseEmbedding
: A SparseEmbedding object.
Create a SparseEmbedding object from an AurelioSparseEmbedding object.
Arguments:
embedding
(BM25SparseEmbedding
): An AurelioSparseEmbedding object.Returns:
SparseEmbedding
: A SparseEmbedding object.
Create a SparseEmbedding object from a dictionary.
Arguments:
sparse_dict
(dict
): A dictionary of sparse values.Returns:
SparseEmbedding
: A SparseEmbedding object.
Create a SparseEmbedding object from a Pinecone dictionary.
Arguments:
sparse_dict
(dict
): A Pinecone dictionary.Returns:
SparseEmbedding
: A SparseEmbedding object.
Convert a SparseEmbedding object to a dictionary.
Returns:
dict
: A dictionary of sparse values.
Convert a SparseEmbedding object to a Pinecone dictionary.
Returns:
dict
: A Pinecone dictionary.
Return a list of (index, value) tuples from the SparseEmbedding object.
Returns:
list
: A list of (index, value) tuples.