Skip to content

Embedding

An embedding is a numerical representation of a text. It is a crucial part of the vector search functionality in Redbox. The Embedding model is used to store the text embedding of a chunk.

redbox.models.embedding.Embedding

Bases: BaseModel

Embedding of a piece of text

object instance-attribute

object

index instance-attribute

index

embedding instance-attribute

embedding

redbox.models.embedding.EmbeddingResponse

Bases: BaseModel

Response from the embedding service in OpenAI format

object instance-attribute

object

data instance-attribute

data

embedding_id instance-attribute

embedding_id

embedding_model instance-attribute

embedding_model

embedding_model_info instance-attribute

embedding_model_info

redbox.models.embedding.EmbeddingRequest

Bases: BaseModel

Request to the embedding service.

sentences instance-attribute

sentences

redbox.models.embedding.EmbedQueueItem

Bases: BaseModel

Instruction to Ingest app for what to embed

chunk_uuid class-attribute instance-attribute

chunk_uuid = Field(description='id of the chunk that this text belongs to')