npcpy 1.3.14__tar.gz → 1.3.15__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 (80) hide show
  1. {npcpy-1.3.14/npcpy.egg-info → npcpy-1.3.15}/PKG-INFO +1 -1
  2. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/rl.py +1 -1
  3. {npcpy-1.3.14 → npcpy-1.3.15/npcpy.egg-info}/PKG-INFO +1 -1
  4. {npcpy-1.3.14 → npcpy-1.3.15}/setup.py +1 -1
  5. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_load.py +3 -13
  6. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_serve.py +3 -0
  7. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_text.py +3 -4
  8. {npcpy-1.3.14 → npcpy-1.3.15}/LICENSE +0 -0
  9. {npcpy-1.3.14 → npcpy-1.3.15}/MANIFEST.in +0 -0
  10. {npcpy-1.3.14 → npcpy-1.3.15}/README.md +0 -0
  11. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/__init__.py +0 -0
  12. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/build_funcs.py +0 -0
  13. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/__init__.py +0 -0
  14. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/audio.py +0 -0
  15. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/data_models.py +0 -0
  16. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/image.py +0 -0
  17. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/load.py +0 -0
  18. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/text.py +0 -0
  19. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/video.py +0 -0
  20. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/data/web.py +0 -0
  21. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/__init__.py +0 -0
  22. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/diff.py +0 -0
  23. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/ge.py +0 -0
  24. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/memory_trainer.py +0 -0
  25. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/model_ensembler.py +0 -0
  26. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/sft.py +0 -0
  27. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ft/usft.py +0 -0
  28. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/__init__.py +0 -0
  29. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/audio_gen.py +0 -0
  30. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/embeddings.py +0 -0
  31. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/image_gen.py +0 -0
  32. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/ocr.py +0 -0
  33. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/response.py +0 -0
  34. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/video_gen.py +0 -0
  35. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/gen/world_gen.py +0 -0
  36. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/llm_funcs.py +0 -0
  37. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/main.py +0 -0
  38. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/__init__.py +0 -0
  39. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/command_history.py +0 -0
  40. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/kg_vis.py +0 -0
  41. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/knowledge_graph.py +0 -0
  42. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/memory_processor.py +0 -0
  43. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/memory/search.py +0 -0
  44. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/mix/__init__.py +0 -0
  45. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/mix/debate.py +0 -0
  46. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/ml_funcs.py +0 -0
  47. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npc_array.py +0 -0
  48. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npc_compiler.py +0 -0
  49. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npc_sysenv.py +0 -0
  50. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/npcs.py +0 -0
  51. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/serve.py +0 -0
  52. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/__init__.py +0 -0
  53. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/ai_function_tools.py +0 -0
  54. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/database_ai_adapters.py +0 -0
  55. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/database_ai_functions.py +0 -0
  56. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/model_runner.py +0 -0
  57. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/npcsql.py +0 -0
  58. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/sql/sql_model_compiler.py +0 -0
  59. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/tools.py +0 -0
  60. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/__init__.py +0 -0
  61. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/browser.py +0 -0
  62. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/desktop.py +0 -0
  63. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/plan.py +0 -0
  64. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy/work/trigger.py +0 -0
  65. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/SOURCES.txt +0 -0
  66. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/dependency_links.txt +0 -0
  67. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/requires.txt +0 -0
  68. {npcpy-1.3.14 → npcpy-1.3.15}/npcpy.egg-info/top_level.txt +0 -0
  69. {npcpy-1.3.14 → npcpy-1.3.15}/setup.cfg +0 -0
  70. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_audio.py +0 -0
  71. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_command_history.py +0 -0
  72. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_documentation_examples.py +0 -0
  73. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_image.py +0 -0
  74. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_llm_funcs.py +0 -0
  75. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_npc_array.py +0 -0
  76. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_npc_compiler.py +0 -0
  77. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_npcsql.py +0 -0
  78. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_response.py +0 -0
  79. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_tools.py +0 -0
  80. {npcpy-1.3.14 → npcpy-1.3.15}/tests/test_web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcpy
3
- Version: 1.3.14
3
+ Version: 1.3.15
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
@@ -344,7 +344,7 @@ def train_with_dpo(
344
344
  args=training_args,
345
345
  train_dataset=preference_dataset,
346
346
  peft_config=peft_config,
347
- tokenizer=tokenizer
347
+ processing_class=tokenizer
348
348
  )
349
349
 
350
350
  print("Starting DPO training...")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcpy
3
- Version: 1.3.14
3
+ Version: 1.3.15
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.14",
86
+ version="1.3.15",
87
87
  packages=find_packages(exclude=["tests*"]),
88
88
  install_requires=base_requirements,
89
89
  extras_require={
@@ -199,15 +199,12 @@ class TestExtensionMap:
199
199
  assert extension_map["MP3"] == "audio"
200
200
 
201
201
 
202
- @pytest.mark.skipif(
203
- not pytest.importorskip("openpyxl", reason="openpyxl not installed"),
204
- reason="openpyxl not installed"
205
- )
206
202
  class TestLoadExcel:
207
203
  """Test Excel file loading - requires openpyxl."""
208
204
 
209
205
  def test_load_excel(self):
210
206
  """Test Excel file loading"""
207
+ pytest.importorskip("openpyxl")
211
208
  from npcpy.data.load import load_excel
212
209
 
213
210
  temp_dir = tempfile.mkdtemp()
@@ -232,16 +229,12 @@ class TestLoadExcel:
232
229
  shutil.rmtree(temp_dir)
233
230
 
234
231
 
235
- @pytest.mark.skipif(
236
- not pytest.importorskip("fitz", reason="PyMuPDF not installed"),
237
- reason="PyMuPDF (fitz) not installed"
238
- )
239
232
  class TestLoadPDF:
240
233
  """Test PDF file loading - requires PyMuPDF."""
241
234
 
242
235
  def test_load_pdf(self):
243
236
  """Test PDF file loading"""
244
- import fitz
237
+ fitz = pytest.importorskip("fitz")
245
238
  from npcpy.data.load import load_pdf
246
239
 
247
240
  temp_dir = tempfile.mkdtemp()
@@ -261,15 +254,12 @@ class TestLoadPDF:
261
254
 
262
255
 
263
256
  @pytest.mark.slow
264
- @pytest.mark.skipif(
265
- not pytest.importorskip("faster_whisper", reason="faster_whisper not installed"),
266
- reason="faster_whisper not installed - audio transcription unavailable"
267
- )
268
257
  class TestLoadAudio:
269
258
  """Test audio file loading - requires faster_whisper (slow, loads model)."""
270
259
 
271
260
  def test_load_audio_wav(self, tmp_path):
272
261
  """Ensure audio loader returns text (transcript or fallback) for wav files."""
262
+ pytest.importorskip("faster_whisper")
273
263
  import wave
274
264
  import struct
275
265
  from npcpy.data.load import load_audio
@@ -5,6 +5,9 @@ import tempfile
5
5
  import shutil
6
6
  import pytest
7
7
 
8
+ # Skip all tests in this module if npcsh is not installed
9
+ pytest.importorskip("npcsh", reason="npcsh package required for serve tests")
10
+
8
11
 
9
12
  @pytest.fixture(scope="module")
10
13
  def client():
@@ -153,15 +153,12 @@ class TestLoadAllFiles:
153
153
 
154
154
 
155
155
  @pytest.mark.slow
156
- @pytest.mark.skipif(
157
- not pytest.importorskip("sentence_transformers", reason="sentence_transformers not installed"),
158
- reason="sentence_transformers not installed - RAG search unavailable"
159
- )
160
156
  class TestRAGSearch:
161
157
  """Test RAG search functionality - requires sentence_transformers (slow, loads model)."""
162
158
 
163
159
  def test_rag_search_with_string(self):
164
160
  """Test RAG search with string input"""
161
+ pytest.importorskip("sentence_transformers")
165
162
  from npcpy.data.text import rag_search
166
163
 
167
164
  text_data = """
@@ -180,6 +177,7 @@ class TestRAGSearch:
180
177
 
181
178
  def test_rag_search_with_dict(self):
182
179
  """Test RAG search with dictionary input"""
180
+ pytest.importorskip("sentence_transformers")
183
181
  from npcpy.data.text import rag_search
184
182
 
185
183
  text_data = {
@@ -198,6 +196,7 @@ class TestRAGSearch:
198
196
 
199
197
  def test_rag_search_high_threshold(self):
200
198
  """Test RAG search with high similarity threshold"""
199
+ pytest.importorskip("sentence_transformers")
201
200
  from npcpy.data.text import rag_search
202
201
 
203
202
  text_data = "The quick brown fox jumps over the lazy dog. Python is great for programming."
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