Pipelines - Model Primitives
For most use cases, we recommend you use the aidb retrievers to interact with models. They can manage creating embeddings and retrieving matching data for many applications.
However, if you need to interact with models directly, you can use the following primitives. The encode functions generate embeddings for text and images, and the decode functions generate text from embeddings.
Generate Text Embeddings
Call aidb.encode_text
to generate a vector representation of a given text input.
For batch inferencing, call aidb.encode_text_batch
:
Generate Image Embeddings
Call aidb.encode_image
to generate a vector representation of a given image input.
For batch inferencing, call aidb.encode_image_batch
:
Generate Prompt Responses
Call aidb.decode_text
to generate a prompt response from a given text input.
For batch inferencing, call aidb.decode_text_batch
:
Could this page be better? Report a problem or suggest an addition!