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.
Files changed (72) hide show
  1. {npcpy-1.2.25/npcpy.egg-info → npcpy-1.2.26}/PKG-INFO +1 -1
  2. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/npc_compiler.py +22 -22
  3. {npcpy-1.2.25 → npcpy-1.2.26/npcpy.egg-info}/PKG-INFO +1 -1
  4. {npcpy-1.2.25 → npcpy-1.2.26}/setup.py +1 -1
  5. {npcpy-1.2.25 → npcpy-1.2.26}/LICENSE +0 -0
  6. {npcpy-1.2.25 → npcpy-1.2.26}/MANIFEST.in +0 -0
  7. {npcpy-1.2.25 → npcpy-1.2.26}/README.md +0 -0
  8. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/__init__.py +0 -0
  9. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/__init__.py +0 -0
  10. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/audio.py +0 -0
  11. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/data_models.py +0 -0
  12. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/image.py +0 -0
  13. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/load.py +0 -0
  14. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/text.py +0 -0
  15. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/video.py +0 -0
  16. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/data/web.py +0 -0
  17. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/__init__.py +0 -0
  18. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/diff.py +0 -0
  19. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/ge.py +0 -0
  20. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/memory_trainer.py +0 -0
  21. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/model_ensembler.py +0 -0
  22. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/rl.py +0 -0
  23. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/sft.py +0 -0
  24. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/ft/usft.py +0 -0
  25. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/__init__.py +0 -0
  26. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/audio_gen.py +0 -0
  27. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/embeddings.py +0 -0
  28. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/image_gen.py +0 -0
  29. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/response.py +0 -0
  30. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/gen/video_gen.py +0 -0
  31. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/llm_funcs.py +0 -0
  32. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/main.py +0 -0
  33. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/__init__.py +0 -0
  34. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/command_history.py +0 -0
  35. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/kg_vis.py +0 -0
  36. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/knowledge_graph.py +0 -0
  37. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/memory_processor.py +0 -0
  38. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/memory/search.py +0 -0
  39. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/mix/__init__.py +0 -0
  40. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/mix/debate.py +0 -0
  41. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/npc_sysenv.py +0 -0
  42. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/npcs.py +0 -0
  43. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/serve.py +0 -0
  44. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/__init__.py +0 -0
  45. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/ai_function_tools.py +0 -0
  46. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/database_ai_adapters.py +0 -0
  47. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/database_ai_functions.py +0 -0
  48. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/model_runner.py +0 -0
  49. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/npcsql.py +0 -0
  50. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/sql/sql_model_compiler.py +0 -0
  51. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/tools.py +0 -0
  52. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/__init__.py +0 -0
  53. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/desktop.py +0 -0
  54. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/plan.py +0 -0
  55. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy/work/trigger.py +0 -0
  56. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/SOURCES.txt +0 -0
  57. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/dependency_links.txt +0 -0
  58. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/requires.txt +0 -0
  59. {npcpy-1.2.25 → npcpy-1.2.26}/npcpy.egg-info/top_level.txt +0 -0
  60. {npcpy-1.2.25 → npcpy-1.2.26}/setup.cfg +0 -0
  61. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_audio.py +0 -0
  62. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_command_history.py +0 -0
  63. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_image.py +0 -0
  64. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_llm_funcs.py +0 -0
  65. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_load.py +0 -0
  66. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_npc_compiler.py +0 -0
  67. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_npcsql.py +0 -0
  68. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_response.py +0 -0
  69. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_serve.py +0 -0
  70. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_text.py +0 -0
  71. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_tools.py +0 -0
  72. {npcpy-1.2.25 → npcpy-1.2.26}/tests/test_web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcpy
3
- Version: 1.2.25
3
+ Version: 1.2.26
4
4
  Summary: npcpy is the premier open-source library for integrating LLMs and Agents into python systems.
5
5
  Home-page: https://github.com/NPC-Worldwide/npcpy
6
6
  Author: Christopher Agostino
@@ -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
- # Parse key=value pairs first
581
- used_args = set()
582
- for i, arg in enumerate(args):
583
- if '=' in arg and not arg.startswith('-'):
584
- key, value = arg.split('=', 1)
585
- key = key.strip().strip("'\"")
586
- value = value.strip().strip("'\"")
587
- inputs[key] = value
588
- used_args.add(i)
589
-
590
- # Parse flags
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
- 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: # Don't overwrite existing values
622
- inputs[input_name] = arg
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcpy
3
- Version: 1.2.25
3
+ Version: 1.2.26
4
4
  Summary: npcpy is the premier open-source library for integrating LLMs and Agents into python systems.
5
5
  Home-page: https://github.com/NPC-Worldwide/npcpy
6
6
  Author: Christopher Agostino
@@ -83,7 +83,7 @@ extra_files = package_files("npcpy/npc_team/")
83
83
 
84
84
  setup(
85
85
  name="npcpy",
86
- version="1.2.25",
86
+ version="1.2.26",
87
87
  packages=find_packages(exclude=["tests*"]),
88
88
  install_requires=base_requirements,
89
89
  extras_require={
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