Skip to content

Commit 0b15597

Browse files
committed
json import error for ollama
1 parent beb751a commit 0b15597

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

npcpy/gen/response.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def get_ollama_response(
8989
pdf_data = load_pdf(attachment)
9090
if pdf_data is not None:
9191
# Extract text and add to prompt
92-
import json
9392
texts = json.loads(pdf_data['texts'].iloc[0])
9493
pdf_text = "\n\n".join([item.get('content', '') for item in texts])
9594

@@ -468,8 +467,7 @@ def handle_streaming_json(api_params):
468467
# Handle case where stream ended but JSON is invalid
469468
print(f"Warning: Complete stream did not produce valid JSON: {json_buffer}")
470469

471-
import uuid
472-
import json
470+
473471

474472
def process_tool_calls(response_dict, tool_map, model, provider, messages, stream=False):
475473
"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def package_files(directory):
8383

8484
setup(
8585
name="npcpy",
86-
version="1.0.11",
86+
version="1.0.12",
8787
packages=find_packages(exclude=["tests*"]),
8888
install_requires=base_requirements, # Only install base requirements by default
8989
extras_require={

0 commit comments

Comments
 (0)