npcpy 1.2.25__tar.gz → 1.2.26__tar.gz
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-1.2.25/npcpy.egg-info → npcpy-1.2.26}/PKG-INFO +1 -1
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/npc_compiler.py +22 -22
- {npcpy-1.2.25 → npcpy-1.2.26/npcpy.egg-info}/PKG-INFO +1 -1
- {npcpy-1.2.25 → npcpy-1.2.26}/setup.py +1 -1
- {npcpy-1.2.25 → npcpy-1.2.26}/LICENSE +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/MANIFEST.in +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/README.md +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/audio.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/data_models.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/image.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/load.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/text.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/video.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/web.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/diff.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/ge.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/memory_trainer.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/model_ensembler.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/rl.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/sft.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/usft.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/audio_gen.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/embeddings.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/image_gen.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/response.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/video_gen.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/llm_funcs.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/main.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/command_history.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/kg_vis.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/knowledge_graph.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/memory_processor.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/search.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/mix/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/mix/debate.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/npc_sysenv.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/npcs.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/serve.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/ai_function_tools.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/database_ai_adapters.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/database_ai_functions.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/model_runner.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/npcsql.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/sql_model_compiler.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/tools.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/__init__.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/desktop.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/plan.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/trigger.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/SOURCES.txt +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/dependency_links.txt +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/requires.txt +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/top_level.txt +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/setup.cfg +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_audio.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_command_history.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_image.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_llm_funcs.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_load.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_npc_compiler.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_npcsql.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_response.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_serve.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_text.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_tools.py +0 -0
- {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_web.py +0 -0
|
@@ -566,7 +566,6 @@ def get_npc_action_space(npc=None, team=None):
|
|
|
566
566
|
def extract_jinx_inputs(args: List[str], jinx: Jinx) -> Dict[str, Any]:
|
|
567
567
|
inputs = {}
|
|
568
568
|
|
|
569
|
-
# Create flag mapping for inputs
|
|
570
569
|
flag_mapping = {}
|
|
571
570
|
for input_ in jinx.inputs:
|
|
572
571
|
if isinstance(input_, str):
|
|
@@ -577,17 +576,19 @@ def extract_jinx_inputs(args: List[str], jinx: Jinx) -> Dict[str, Any]:
|
|
|
577
576
|
flag_mapping[f"-{key[0]}"] = key
|
|
578
577
|
flag_mapping[f"--{key}"] = key
|
|
579
578
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
579
|
+
if len(jinx.inputs) > 1:
|
|
580
|
+
used_args = set()
|
|
581
|
+
for i, arg in enumerate(args):
|
|
582
|
+
if '=' in arg and arg != '=' and not arg.startswith('-'):
|
|
583
|
+
key, value = arg.split('=', 1)
|
|
584
|
+
key = key.strip().strip("'\"")
|
|
585
|
+
value = value.strip().strip("'\"")
|
|
586
|
+
inputs[key] = value
|
|
587
|
+
used_args.add(i)
|
|
588
|
+
else:
|
|
589
|
+
used_args = set()
|
|
590
|
+
|
|
591
|
+
|
|
591
592
|
for i, arg in enumerate(args):
|
|
592
593
|
if i in used_args:
|
|
593
594
|
continue
|
|
@@ -599,29 +600,28 @@ def extract_jinx_inputs(args: List[str], jinx: Jinx) -> Dict[str, Any]:
|
|
|
599
600
|
used_args.add(i)
|
|
600
601
|
used_args.add(i + 1)
|
|
601
602
|
else:
|
|
602
|
-
# Boolean flag
|
|
603
603
|
input_name = flag_mapping[arg]
|
|
604
604
|
inputs[input_name] = True
|
|
605
605
|
used_args.add(i)
|
|
606
606
|
|
|
607
|
-
# Handle remaining positional arguments
|
|
608
607
|
unused_args = [arg for i, arg in enumerate(args) if i not in used_args]
|
|
609
608
|
|
|
610
|
-
# Map positional args to jinx inputs in order
|
|
611
609
|
jinx_input_names = []
|
|
612
610
|
for input_ in jinx.inputs:
|
|
613
611
|
if isinstance(input_, str):
|
|
614
612
|
jinx_input_names.append(input_)
|
|
615
613
|
elif isinstance(input_, dict):
|
|
616
614
|
jinx_input_names.append(list(input_.keys())[0])
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
if
|
|
622
|
-
|
|
615
|
+
if len(jinx_input_names) == 1:
|
|
616
|
+
inputs[jinx_input_names[0]] = ' '.join(unused_args).strip()
|
|
617
|
+
else:
|
|
618
|
+
for i, arg in enumerate(unused_args):
|
|
619
|
+
if i < len(jinx_input_names):
|
|
620
|
+
input_name = jinx_input_names[i]
|
|
621
|
+
if input_name not in inputs:
|
|
622
|
+
inputs[input_name] = arg
|
|
623
|
+
|
|
623
624
|
|
|
624
|
-
# Set default values for missing inputs
|
|
625
625
|
for input_ in jinx.inputs:
|
|
626
626
|
if isinstance(input_, str):
|
|
627
627
|
if input_ not in inputs:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|