(
self,
project_path: str,
db_name: str = '.text_table',
platform: str = 'OpenAI',
api_key: str = None,
embedding_model: str = "text-embedding-3-small",
)
| 9 | |
| 10 | class TextMemory(Memory): |
| 11 | def __init__( |
| 12 | self, |
| 13 | project_path: str, |
| 14 | db_name: str = '.text_table', |
| 15 | platform: str = 'OpenAI', |
| 16 | api_key: str = None, |
| 17 | embedding_model: str = "text-embedding-3-small", |
| 18 | ): |
| 19 | super().__init__( |
| 20 | project_path=project_path, |
| 21 | db_name=db_name, |
| 22 | platform=platform, |
| 23 | api_key=api_key, |
| 24 | embedding_model=embedding_model |
| 25 | ) |
| 26 | self.collection_name = 'text_memory' |
| 27 | |
| 28 | def add_text_content(self, paper_content: str, batch_size: int = 100, collection = None): |
| 29 | assert collection is not None, "Collection is required. Should be the path of the paper." |
nothing calls this directly
no outgoing calls
no test coverage detected