praisonaiagents 0.0.38__py3-none-any.whl → 0.0.39__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- praisonaiagents/knowledge/knowledge.py +20 -7
- {praisonaiagents-0.0.38.dist-info → praisonaiagents-0.0.39.dist-info}/METADATA +1 -1
- {praisonaiagents-0.0.38.dist-info → praisonaiagents-0.0.39.dist-info}/RECORD +5 -5
- {praisonaiagents-0.0.38.dist-info → praisonaiagents-0.0.39.dist-info}/WHEEL +0 -0
- {praisonaiagents-0.0.38.dist-info → praisonaiagents-0.0.39.dist-info}/top_level.txt +0 -0
@@ -4,6 +4,7 @@ import uuid
|
|
4
4
|
import time
|
5
5
|
from .chunking import Chunking
|
6
6
|
from functools import cached_property
|
7
|
+
from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, TaskProgressColumn
|
7
8
|
|
8
9
|
logger = logging.getLogger(__name__)
|
9
10
|
|
@@ -274,14 +275,26 @@ class Knowledge:
|
|
274
275
|
# Treat as raw text content only if no file extension
|
275
276
|
memories = [self.normalize_content(input_path)]
|
276
277
|
|
277
|
-
#
|
278
|
+
# Create progress display
|
279
|
+
progress = Progress(
|
280
|
+
SpinnerColumn(),
|
281
|
+
TextColumn("[progress.description]{task.description}"),
|
282
|
+
BarColumn(),
|
283
|
+
TaskProgressColumn(),
|
284
|
+
transient=True
|
285
|
+
)
|
286
|
+
|
287
|
+
# Store memories with progress bar
|
278
288
|
all_results = []
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
289
|
+
with progress:
|
290
|
+
store_task = progress.add_task(f"Adding to Knowledge from {os.path.basename(input_path)}", total=len(memories))
|
291
|
+
for memory in memories:
|
292
|
+
if memory:
|
293
|
+
memory_result = self.store(memory, user_id=user_id, agent_id=agent_id,
|
294
|
+
run_id=run_id, metadata=metadata)
|
295
|
+
if memory_result:
|
296
|
+
all_results.extend(memory_result.get('results', []))
|
297
|
+
progress.advance(store_task)
|
285
298
|
|
286
299
|
return {'results': all_results, 'relations': []}
|
287
300
|
|
@@ -7,7 +7,7 @@ praisonaiagents/agents/agents.py,sha256=M-nR53A7Qcz_pJ-gyNc4xgM13Nhof7oM-5hXWzr8
|
|
7
7
|
praisonaiagents/agents/autoagents.py,sha256=bjC2O5oZmoJItJXIMPTWc2lsp_AJC9tMiTQOal2hwPA,13532
|
8
8
|
praisonaiagents/knowledge/__init__.py,sha256=xL1Eh-a3xsHyIcU4foOWF-JdWYIYBALJH9bge0Ujuto,246
|
9
9
|
praisonaiagents/knowledge/chunking.py,sha256=FzoNY0q8MkvG4gADqk4JcRhmH3lcEHbRdonDgitQa30,6624
|
10
|
-
praisonaiagents/knowledge/knowledge.py,sha256=
|
10
|
+
praisonaiagents/knowledge/knowledge.py,sha256=dJd8WuFV3w-zWaSAcT21PcXGRIZZc6YxBsJZDfmZNrk,12358
|
11
11
|
praisonaiagents/memory/memory.py,sha256=ZxqSpOUxk9jeTKGW0ZiTifC0uZtym-EZILP3kuOOKkU,35626
|
12
12
|
praisonaiagents/process/__init__.py,sha256=lkYbL7Hn5a0ldvJtkdH23vfIIZLIcanK-65C0MwaorY,52
|
13
13
|
praisonaiagents/process/process.py,sha256=uSudOFI1ZlGM_nbT8qHD4iIP3y5Ygu8V-izLot2te70,26316
|
@@ -33,7 +33,7 @@ praisonaiagents/tools/wikipedia_tools.py,sha256=pGko-f33wqXgxJTv8db7TbizY5XnzBQR
|
|
33
33
|
praisonaiagents/tools/xml_tools.py,sha256=iYTMBEk5l3L3ryQ1fkUnNVYK-Nnua2Kx2S0dxNMMs1A,17122
|
34
34
|
praisonaiagents/tools/yaml_tools.py,sha256=uogAZrhXV9O7xvspAtcTfpKSQYL2nlOTvCQXN94-G9A,14215
|
35
35
|
praisonaiagents/tools/yfinance_tools.py,sha256=s2PBj_1v7oQnOobo2fDbQBACEHl61ftG4beG6Z979ZE,8529
|
36
|
-
praisonaiagents-0.0.
|
37
|
-
praisonaiagents-0.0.
|
38
|
-
praisonaiagents-0.0.
|
39
|
-
praisonaiagents-0.0.
|
36
|
+
praisonaiagents-0.0.39.dist-info/METADATA,sha256=nfUgMS-EXpJn1Aee7bNdYcDq_Oxgkcbe-W3DrcCEWLw,664
|
37
|
+
praisonaiagents-0.0.39.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
38
|
+
praisonaiagents-0.0.39.dist-info/top_level.txt,sha256=_HsRddrJ23iDx5TTqVUVvXG2HeHBL5voshncAMDGjtA,16
|
39
|
+
praisonaiagents-0.0.39.dist-info/RECORD,,
|
File without changes
|
File without changes
|