pro-craft 0.1.7__tar.gz → 0.1.9__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.
Potentially problematic release.
This version of pro-craft might be problematic. Click here for more details.
- {pro_craft-0.1.7 → pro_craft-0.1.9}/PKG-INFO +1 -1
- {pro_craft-0.1.7 → pro_craft-0.1.9}/pyproject.toml +1 -1
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/prompt_helper_async.py +8 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft.egg-info/PKG-INFO +1 -1
- {pro_craft-0.1.7 → pro_craft-0.1.9}/README.md +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/setup.cfg +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/__init__.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/code_helper/coder.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/database.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/designer.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/evals.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/file_manager.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/log.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/prompt_helper.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/__main__.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/mcp/__init__.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/mcp/content.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/mcp/math.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/mcp/resource.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/mcp/weather.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/models.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server/router/recommended.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/server.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft/utils.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft.egg-info/SOURCES.txt +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft.egg-info/dependency_links.txt +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft.egg-info/requires.txt +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/src/pro_craft.egg-info/top_level.txt +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/tests/test22.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/tests/test_33.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/tests/test_coder.py +0 -0
- {pro_craft-0.1.7 → pro_craft-0.1.9}/tests/test_designer.py +0 -0
|
@@ -21,6 +21,7 @@ import inspect
|
|
|
21
21
|
from pydantic import BaseModel, Field, ValidationError, field_validator
|
|
22
22
|
from datetime import datetime
|
|
23
23
|
from pro_craft.utils import extract_
|
|
24
|
+
from json.decoder import JSONDecodeError
|
|
24
25
|
logger = Log.logger
|
|
25
26
|
editing_log = logger.debug
|
|
26
27
|
import re
|
|
@@ -553,9 +554,16 @@ class AsyncIntel():
|
|
|
553
554
|
try:
|
|
554
555
|
|
|
555
556
|
json_str = extract_(ai_result,r'json')
|
|
557
|
+
# json_str = fix_broken_json_string(json_str)
|
|
558
|
+
ai_result = json.loads(json_str)
|
|
559
|
+
OutputFormat(**ai_result)
|
|
560
|
+
except JSONDecodeError as e:
|
|
561
|
+
logger.error(f"json 解析出现错误: {e}")
|
|
562
|
+
logger.error(f"尝试补救")
|
|
556
563
|
json_str = fix_broken_json_string(json_str)
|
|
557
564
|
ai_result = json.loads(json_str)
|
|
558
565
|
OutputFormat(**ai_result)
|
|
566
|
+
|
|
559
567
|
except ValidationError as e:
|
|
560
568
|
log_ = "记忆卡片合并 - 大模型生成的格式未通过校验"
|
|
561
569
|
logger.error(log_)
|
|
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
|