pyrit.memory.MemoryEmbedding#

class MemoryEmbedding(*, embedding_model: EmbeddingSupport | None)[source]#

Bases: object

The MemoryEmbedding class is responsible for encoding the memory embeddings.

Parameters:

embedding_model (EmbeddingSupport) – An instance of a class that supports embedding generation.

__init__(*, embedding_model: EmbeddingSupport | None)[source]#

Methods

__init__(*, embedding_model)

generate_embedding_memory_data(*, ...)

Generates metadata for a chat memory entry.

generate_embedding_memory_data(*, prompt_request_piece: PromptRequestPiece) EmbeddingDataEntry[source]#

Generates metadata for a chat memory entry.

Parameters:

chat_memory (ConversationData) – The chat memory entry.

Returns:

The generated metadata.

Return type:

ConversationMemoryEntryMetadata