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.
- {npcpy-1.3.5/npcpy.egg-info → npcpy-1.3.6}/PKG-INFO +1 -1
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/response.py +1 -1
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/llm_funcs.py +9 -5
- {npcpy-1.3.5 → npcpy-1.3.6/npcpy.egg-info}/PKG-INFO +1 -1
- {npcpy-1.3.5 → npcpy-1.3.6}/setup.py +1 -1
- {npcpy-1.3.5 → npcpy-1.3.6}/LICENSE +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/MANIFEST.in +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/README.md +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/build_funcs.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/audio.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/data_models.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/image.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/load.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/text.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/video.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/data/web.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/diff.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/ge.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/memory_trainer.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/model_ensembler.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/rl.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/sft.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ft/usft.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/audio_gen.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/embeddings.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/image_gen.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/ocr.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/video_gen.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/gen/world_gen.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/main.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/command_history.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/kg_vis.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/knowledge_graph.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/memory_processor.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/memory/search.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/mix/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/mix/debate.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/ml_funcs.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npc_array.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npc_compiler.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npc_sysenv.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/npcs.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/serve.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/ai_function_tools.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/database_ai_adapters.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/database_ai_functions.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/model_runner.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/npcsql.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/sql/sql_model_compiler.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/tools.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/__init__.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/browser.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/desktop.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/plan.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy/work/trigger.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/SOURCES.txt +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/dependency_links.txt +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/requires.txt +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/npcpy.egg-info/top_level.txt +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/setup.cfg +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_audio.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_command_history.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_image.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_llm_funcs.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_load.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_npc_array.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_npc_compiler.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_npcsql.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_response.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_serve.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_text.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_tools.py +0 -0
- {npcpy-1.3.5 → npcpy-1.3.6}/tests/test_web.py +0 -0
|
@@ -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
|
|
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
|
-
|
|
786
|
+
# Dict inputs have defaults (e.g., "backup: true"), so they're optional
|
|
787
|
+
optional_names.extend(inp.keys())
|
|
785
788
|
|
|
786
|
-
#
|
|
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
|
-
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|