npcpy 1.2.35__py3-none-any.whl → 1.2.37__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/__init__.py +10 -2
- npcpy/gen/image_gen.py +5 -2
- npcpy/gen/response.py +262 -64
- npcpy/llm_funcs.py +478 -832
- npcpy/ml_funcs.py +746 -0
- npcpy/npc_array.py +1294 -0
- npcpy/npc_compiler.py +348 -252
- npcpy/npc_sysenv.py +17 -2
- npcpy/serve.py +684 -90
- npcpy/sql/npcsql.py +96 -59
- {npcpy-1.2.35.dist-info → npcpy-1.2.37.dist-info}/METADATA +173 -1
- {npcpy-1.2.35.dist-info → npcpy-1.2.37.dist-info}/RECORD +15 -13
- {npcpy-1.2.35.dist-info → npcpy-1.2.37.dist-info}/WHEEL +0 -0
- {npcpy-1.2.35.dist-info → npcpy-1.2.37.dist-info}/licenses/LICENSE +0 -0
- {npcpy-1.2.35.dist-info → npcpy-1.2.37.dist-info}/top_level.txt +0 -0
npcpy/npc_sysenv.py
CHANGED
|
@@ -842,8 +842,23 @@ The current date and time are : {datetime.now().strftime("%Y-%m-%d %H:%M:%S")}
|
|
|
842
842
|
|
|
843
843
|
if team is not None:
|
|
844
844
|
team_context = team.context if hasattr(team, "context") and team.context else ""
|
|
845
|
-
|
|
846
|
-
|
|
845
|
+
# preferences now comes from shared_context like other generic context keys
|
|
846
|
+
team_preferences = team.shared_context.get('preferences', '') if hasattr(team, "shared_context") else ""
|
|
847
|
+
system_message += f"\nTeam context: {team_context}\n"
|
|
848
|
+
if team_preferences:
|
|
849
|
+
system_message += f"Team preferences: {team_preferences}\n"
|
|
850
|
+
|
|
851
|
+
# Add team members
|
|
852
|
+
if hasattr(team, 'npcs') and team.npcs:
|
|
853
|
+
members = []
|
|
854
|
+
for name, member in team.npcs.items():
|
|
855
|
+
if name != npc.name: # Don't list self
|
|
856
|
+
directive = getattr(member, 'primary_directive', '')
|
|
857
|
+
# Get first line or first 100 chars
|
|
858
|
+
desc = directive.split('\n')[0][:100] if directive else ''
|
|
859
|
+
members.append(f" - {name}: {desc}")
|
|
860
|
+
if members:
|
|
861
|
+
system_message += "\nTeam members (use delegate tool to assign tasks):\n" + "\n".join(members) + "\n"
|
|
847
862
|
|
|
848
863
|
system_message += """
|
|
849
864
|
IMPORTANT:
|