Documentation for the praisonaiagents.knowledge module - Advanced knowledge management and retrieval
config: Optional[Dict[str, Any]] = None
- Configuration for vector store and processingverbose: int = 0
- Verbosity level (0-5+) for logging outputmemory
- Returns a CustomMemory instance for knowledge storagemarkdown
- Returns MarkItDown instance for document processingchunker
- Returns a Chunking instance with configured strategystore(content, user_id="user", agent_id=None, run_id=None, metadata=None)
- Store raw text or file contentadd(file_path, user_id="user", agent_id=None, run_id=None, metadata=None)
- Process and add files to knowledge basesearch(query, user_id=None, agent_id=None, run_id=None, rerank=True, **kwargs)
- Search knowledge with optional rerankingget(memory_id)
- Retrieve specific memory by IDget_all(user_id=None, agent_id=None, run_id=None)
- Retrieve all memories with filteringupdate(memory_id, data)
- Update existing memorydelete(memory_id)
- Delete specific memorydelete_all(user_id=None, agent_id=None, run_id=None)
- Batch delete with filteringreset()
- Clear all memorieshistory(memory_id)
- Get change history for a memorychunker_type: str = 'recursive'
- Type of chunking strategychunk_size: int = 512
- Maximum size of each chunkchunk_overlap: int = 50
- Overlap between chunkstokenizer: Optional[Any] = None
- Custom tokenizer (defaults to GPT-2)embedding_model: Optional[Any] = None
- Embedding model for semantic chunkingchunk(text: str) → List[Chunk]
- Split text into chunks using configured strategy'token'
)'sentence'
)'recursive'
) - Default'semantic'
)'sdpm'
)'late'
).praison/chroma_db
)source
- File path, URL, or direct text contentbool
- Success statusquery
- Search querylimit
- Maximum number of resultstext
- Content chunksource
- Original sourcescore
- Relevance scoremetadata
- Additional metadataquery
- Search querymax_results
- Maximum results to includetotal_chunks
- Number of stored chunkssources
- List of unique sourcescollection_name
- Name of the collectionstorage_path
- Path to storage