npcpy 1.3.5__tar.gz → 1.3.6__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 (79) hide show
  1. {npcpy-1.3.5/npcpy.egg-info → npcpy-1.3.6}/PKG-INFO +1 -1
  2. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/response.py +1 -1
  3. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/llm_funcs.py +9 -5
  4. {npcpy-1.3.5 → npcpy-1.3.6/npcpy.egg-info}/PKG-INFO +1 -1
  5. {npcpy-1.3.5 → npcpy-1.3.6}/setup.py +1 -1
  6. {npcpy-1.3.5 → npcpy-1.3.6}/LICENSE +0 -0
  7. {npcpy-1.3.5 → npcpy-1.3.6}/MANIFEST.in +0 -0
  8. {npcpy-1.3.5 → npcpy-1.3.6}/README.md +0 -0
  9. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/__init__.py +0 -0
  10. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/build_funcs.py +0 -0
  11. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/__init__.py +0 -0
  12. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/audio.py +0 -0
  13. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/data_models.py +0 -0
  14. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/image.py +0 -0
  15. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/load.py +0 -0
  16. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/text.py +0 -0
  17. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/video.py +0 -0
  18. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/web.py +0 -0
  19. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/__init__.py +0 -0
  20. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/diff.py +0 -0
  21. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/ge.py +0 -0
  22. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/memory_trainer.py +0 -0
  23. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/model_ensembler.py +0 -0
  24. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/rl.py +0 -0
  25. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/sft.py +0 -0
  26. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/usft.py +0 -0
  27. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/__init__.py +0 -0
  28. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/audio_gen.py +0 -0
  29. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/embeddings.py +0 -0
  30. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/image_gen.py +0 -0
  31. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/ocr.py +0 -0
  32. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/video_gen.py +0 -0
  33. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/world_gen.py +0 -0
  34. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/main.py +0 -0
  35. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/__init__.py +0 -0
  36. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/command_history.py +0 -0
  37. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/kg_vis.py +0 -0
  38. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/knowledge_graph.py +0 -0
  39. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/memory_processor.py +0 -0
  40. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/search.py +0 -0
  41. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/mix/__init__.py +0 -0
  42. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/mix/debate.py +0 -0
  43. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ml_funcs.py +0 -0
  44. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npc_array.py +0 -0
  45. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npc_compiler.py +0 -0
  46. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npc_sysenv.py +0 -0
  47. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npcs.py +0 -0
  48. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/serve.py +0 -0
  49. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/__init__.py +0 -0
  50. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/ai_function_tools.py +0 -0
  51. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/database_ai_adapters.py +0 -0
  52. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/database_ai_functions.py +0 -0
  53. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/model_runner.py +0 -0
  54. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/npcsql.py +0 -0
  55. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/sql_model_compiler.py +0 -0
  56. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/tools.py +0 -0
  57. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/__init__.py +0 -0
  58. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/browser.py +0 -0
  59. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/desktop.py +0 -0
  60. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/plan.py +0 -0
  61. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/trigger.py +0 -0
  62. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/SOURCES.txt +0 -0
  63. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/dependency_links.txt +0 -0
  64. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/requires.txt +0 -0
  65. {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/top_level.txt +0 -0
  66. {npcpy-1.3.5 → npcpy-1.3.6}/setup.cfg +0 -0
  67. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_audio.py +0 -0
  68. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_command_history.py +0 -0
  69. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_image.py +0 -0
  70. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_llm_funcs.py +0 -0
  71. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_load.py +0 -0
  72. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_npc_array.py +0 -0
  73. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_npc_compiler.py +0 -0
  74. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_npcsql.py +0 -0
  75. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_response.py +0 -0
  76. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_serve.py +0 -0
  77. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_text.py +0 -0
  78. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_tools.py +0 -0
  79. {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcpy
3
- Version: 1.3.5
3
+ Version: 1.3.6
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
@@ -753,7 +753,7 @@ def get_litellm_response(
753
753
  model = model.split('-npc')[0]
754
754
  provider = "openai"
755
755
 
756
- if isinstance(format, BaseModel):
756
+ if isinstance(format, type) and issubclass(format, BaseModel):
757
757
  api_params["response_format"] = format
758
758
  if model is None:
759
759
  model = os.environ.get("NPCSH_CHAT_MODEL", "llama3.2")
@@ -775,19 +775,23 @@ Instructions:
775
775
  required_inputs = []
776
776
 
777
777
  if required_inputs:
778
- # Get just the parameter names (handle both string and dict formats)
779
- required_names = []
778
+ # Get parameter names, distinguishing required (string) from optional with defaults (dict)
779
+ required_names = [] # Params without defaults - truly required
780
+ optional_names = [] # Params with defaults - not required
780
781
  for inp in required_inputs:
781
782
  if isinstance(inp, str):
783
+ # String inputs have no default, so they're required
782
784
  required_names.append(inp)
783
785
  elif isinstance(inp, dict):
784
- required_names.extend(inp.keys())
786
+ # Dict inputs have defaults (e.g., "backup: true"), so they're optional
787
+ optional_names.extend(inp.keys())
785
788
 
786
- # Check which required params are missing
789
+ # Only check truly required params (those without defaults)
787
790
  missing = [p for p in required_names if p not in inputs or not inputs.get(p)]
788
791
  provided = list(inputs.keys())
789
792
  if missing:
790
- context = f"Error: jinx '{jinx_name}' requires parameters {required_names} but got {provided}. Missing: {missing}. Please retry with correct parameter names."
793
+ all_params = required_names + optional_names
794
+ context = f"Error: jinx '{jinx_name}' requires parameters {required_names} but got {provided}. Missing: {missing}. Optional params with defaults: {optional_names}. Please retry with correct parameter names."
791
795
  logger.debug(f"[_react_fallback] Missing required params: {missing}")
792
796
  print(f"[REACT-DEBUG] Missing params for {jinx_name}: {missing}, got: {provided}")
793
797
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcpy
3
- Version: 1.3.5
3
+ Version: 1.3.6
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.3.5",
86
+ version="1.3.6",
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
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