migrate fern
This commit is contained in:
36
fern/python-reference/Passage.mdx
Normal file
36
fern/python-reference/Passage.mdx
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
slug: python-reference/Passage
|
||||
---
|
||||
|
||||
<a id="letta.schemas.passage.Passage"></a>
|
||||
|
||||
## Passage
|
||||
|
||||
```python
|
||||
class Passage(PassageBase)
|
||||
```
|
||||
|
||||
Representation of a passage, which is stored in archival memory.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `text` _str_ - The text of the passage.
|
||||
- `embedding` _List[float]_ - The embedding of the passage.
|
||||
- `embedding_config` _EmbeddingConfig_ - The embedding configuration used by the passage.
|
||||
- `created_at` _datetime_ - The creation date of the passage.
|
||||
- `user_id` _str_ - The unique identifier of the user associated with the passage.
|
||||
- `agent_id` _str_ - The unique identifier of the agent associated with the passage.
|
||||
- `source_id` _str_ - The data source of the passage.
|
||||
- `doc_id` _str_ - The unique identifier of the document associated with the passage.
|
||||
|
||||
<a id="letta.schemas.passage.Passage.pad_embeddings"></a>
|
||||
|
||||
#### pad\_embeddings
|
||||
|
||||
```python
|
||||
@field_validator("embedding")
|
||||
@classmethod
|
||||
def pad_embeddings(cls, embedding: List[float]) -> List[float]
|
||||
```
|
||||
|
||||
Pad embeddings to `MAX_EMBEDDING_SIZE`. This is necessary to ensure all stored embeddings are the same size.
|
||||
Reference in New Issue
Block a user