MCPcopy Create free account
hub / github.com/HKUDS/AutoAgent / __init__

Method __init__

autoagent/memory/paper_memory.py:11–26  ·  view source on GitHub ↗
(
        self,
        project_path: str,
        db_name: str = '.text_table',
        platform: str = 'OpenAI',
        api_key: str = None,
        embedding_model: str = "text-embedding-3-small",
    )

Source from the content-addressed store, hash-verified

9
10class 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."

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected