npcpy 1.2.16__py3-none-any.whl → 1.2.17__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.
- npcpy/memory/command_history.py +3 -3
- npcpy/memory/knowledge_graph.py +4 -0
- npcpy/npc_compiler.py +3 -1
- {npcpy-1.2.16.dist-info → npcpy-1.2.17.dist-info}/METADATA +1 -1
- {npcpy-1.2.16.dist-info → npcpy-1.2.17.dist-info}/RECORD +8 -8
- {npcpy-1.2.16.dist-info → npcpy-1.2.17.dist-info}/WHEEL +0 -0
- {npcpy-1.2.16.dist-info → npcpy-1.2.17.dist-info}/licenses/LICENSE +0 -0
- {npcpy-1.2.16.dist-info → npcpy-1.2.17.dist-info}/top_level.txt +0 -0
npcpy/memory/command_history.py
CHANGED
|
@@ -604,16 +604,16 @@ class CommandHistory:
|
|
|
604
604
|
|
|
605
605
|
stmt = """
|
|
606
606
|
INSERT INTO memory_lifecycle
|
|
607
|
-
(message_id, conversation_id, npc, team, directory_path,
|
|
607
|
+
(message_id, conversation_id, npc, team, directory_path, timestamp,
|
|
608
608
|
initial_memory, final_memory, status, model, provider)
|
|
609
609
|
VALUES (:message_id, :conversation_id, :npc, :team, :directory_path,
|
|
610
|
-
:
|
|
610
|
+
:timestamp, :initial_memory, :final_memory, :status, :model, :provider)
|
|
611
611
|
"""
|
|
612
612
|
|
|
613
613
|
params = {
|
|
614
614
|
"message_id": message_id, "conversation_id": conversation_id,
|
|
615
615
|
"npc": npc, "team": team, "directory_path": directory_path,
|
|
616
|
-
"
|
|
616
|
+
"timestamp": timestamp, "initial_memory": initial_memory,
|
|
617
617
|
"final_memory": final_memory, "status": status,
|
|
618
618
|
"model": model, "provider": provider
|
|
619
619
|
}
|
npcpy/memory/knowledge_graph.py
CHANGED
|
@@ -359,6 +359,7 @@ def kg_evolve_incremental(existing_kg,
|
|
|
359
359
|
all_concept_names = list(existing_concept_names)
|
|
360
360
|
|
|
361
361
|
all_new_facts = []
|
|
362
|
+
print(npc, npc.model, npc.provider)
|
|
362
363
|
|
|
363
364
|
if new_facts:
|
|
364
365
|
all_new_facts = new_facts
|
|
@@ -375,12 +376,14 @@ def kg_evolve_incremental(existing_kg,
|
|
|
375
376
|
npc = npc,
|
|
376
377
|
context=context)
|
|
377
378
|
all_new_facts.extend(facts)
|
|
379
|
+
print(facts)
|
|
378
380
|
else:
|
|
379
381
|
all_new_facts = get_facts(new_content_text,
|
|
380
382
|
model=model,
|
|
381
383
|
provider=provider,
|
|
382
384
|
npc = npc,
|
|
383
385
|
context=context)
|
|
386
|
+
print(all_new_facts)
|
|
384
387
|
else:
|
|
385
388
|
print("No new content or facts provided")
|
|
386
389
|
return existing_kg, {}
|
|
@@ -398,6 +401,7 @@ def kg_evolve_incremental(existing_kg,
|
|
|
398
401
|
provider = provider,
|
|
399
402
|
npc=npc,
|
|
400
403
|
context=context)
|
|
404
|
+
print(candidate_concepts)
|
|
401
405
|
print('checking group uniqueness')
|
|
402
406
|
for cand_concept in candidate_concepts:
|
|
403
407
|
cand_name = cand_concept['name']
|
npcpy/npc_compiler.py
CHANGED
|
@@ -746,7 +746,9 @@ class NPC:
|
|
|
746
746
|
npc_name=self.name,
|
|
747
747
|
directory_path=directory_path
|
|
748
748
|
)
|
|
749
|
-
|
|
749
|
+
print('# of facts: ', len(kg_data['facts']))
|
|
750
|
+
print('# of facts: ', len(kg_data['concepts']))
|
|
751
|
+
|
|
750
752
|
if not kg_data.get('facts') and not kg_data.get('concepts'):
|
|
751
753
|
return self._initialize_kg_from_history()
|
|
752
754
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
npcpy/__init__.py,sha256=9imxFtK74_6Rw9rz0kyMnZYl_voPb569tkTlYLt0Urg,131
|
|
2
2
|
npcpy/llm_funcs.py,sha256=tvcZuQEcIUJClwEJQXBF6ArEVjSuXt1jAcZOcnYWsVQ,85101
|
|
3
3
|
npcpy/main.py,sha256=RWoRIj6VQLxKdOKvdVyaq2kwG35oRpeXPvp1CAAoG-w,81
|
|
4
|
-
npcpy/npc_compiler.py,sha256=
|
|
4
|
+
npcpy/npc_compiler.py,sha256=kTkfhxc-B5r0O4DpUIqk51WWkmn3FMJNddp-Npanx60,86218
|
|
5
5
|
npcpy/npc_sysenv.py,sha256=lPYlKM_TeR4l4-Jcgiqq3CCge8b2oFHdfISD4L_G7eo,30308
|
|
6
6
|
npcpy/npcs.py,sha256=eExuVsbTfrRobTRRptRpDm46jCLWUgbvy4_U7IUQo-c,744
|
|
7
7
|
npcpy/serve.py,sha256=RPYT3ZMu-OmO6dg3Ss04wZQNlZQive5cm2UPUbtToV0,100271
|
|
@@ -27,9 +27,9 @@ npcpy/gen/image_gen.py,sha256=ln71jmLoJHekbZYDJpTe5DtOamVte9gjr2BPQ1DzjMQ,14955
|
|
|
27
27
|
npcpy/gen/response.py,sha256=Rrk3rrSSGode94JJkKyL4n9Dpw9CH7R5l9xyjQSDFxE,28954
|
|
28
28
|
npcpy/gen/video_gen.py,sha256=JMp2s2qMp5uy0rOgv6BRZ7nkQI4vdT1hbJ2nSu4s-KA,3243
|
|
29
29
|
npcpy/memory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
-
npcpy/memory/command_history.py,sha256=
|
|
30
|
+
npcpy/memory/command_history.py,sha256=Ww7vZTSjQDuElQXuOjsvu7NTljOLAg07QIFrfKARpVg,45562
|
|
31
31
|
npcpy/memory/kg_vis.py,sha256=TrQQCRh_E7Pyr-GPAHLSsayubAfGyf4HOEFrPB6W86Q,31280
|
|
32
|
-
npcpy/memory/knowledge_graph.py,sha256=
|
|
32
|
+
npcpy/memory/knowledge_graph.py,sha256=2XpIlsyPdAOnzQ6kkwP6MWPGwL3P6V33_3suNJYMMJE,48681
|
|
33
33
|
npcpy/memory/memory_processor.py,sha256=nK5vWTLeevAQDXM15wF9MSTK6Yr-qYCjgiwmCKXWTSI,5288
|
|
34
34
|
npcpy/memory/search.py,sha256=glN6WYzaixcoDphTEHAXSMX3vKZGjR12Jx9YVL_gYfE,18433
|
|
35
35
|
npcpy/mix/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -41,8 +41,8 @@ npcpy/work/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
41
41
|
npcpy/work/desktop.py,sha256=F3I8mUtJp6LAkXodsh8hGZIncoads6c_2Utty-0EdDA,2986
|
|
42
42
|
npcpy/work/plan.py,sha256=QyUwg8vElWiHuoS-xK4jXTxxHvkMD3VkaCEsCmrEPQk,8300
|
|
43
43
|
npcpy/work/trigger.py,sha256=P1Y8u1wQRsS2WACims_2IdkBEar-iBQix-2TDWoW0OM,9948
|
|
44
|
-
npcpy-1.2.
|
|
45
|
-
npcpy-1.2.
|
|
46
|
-
npcpy-1.2.
|
|
47
|
-
npcpy-1.2.
|
|
48
|
-
npcpy-1.2.
|
|
44
|
+
npcpy-1.2.17.dist-info/licenses/LICENSE,sha256=j0YPvce7Ng9e32zYOu0EmXjXeJ0Nwawd0RA3uSGGH4E,1070
|
|
45
|
+
npcpy-1.2.17.dist-info/METADATA,sha256=-WglQgBsbujF70Yr1Zp1HTzPPGzJ28iHxLUetPgLs34,26084
|
|
46
|
+
npcpy-1.2.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
47
|
+
npcpy-1.2.17.dist-info/top_level.txt,sha256=g1pbSvrOOncB74Bg5-J0Olg4V0A5VzDw-Xz5YObq8BU,6
|
|
48
|
+
npcpy-1.2.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|