pro-craft 0.1.8__py3-none-any.whl → 0.1.9__py3-none-any.whl

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.

@@ -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
@@ -556,6 +557,13 @@ class AsyncIntel():
556
557
  # json_str = fix_broken_json_string(json_str)
557
558
  ai_result = json.loads(json_str)
558
559
  OutputFormat(**ai_result)
560
+ except JSONDecodeError as e:
561
+ logger.error(f"json 解析出现错误: {e}")
562
+ logger.error(f"尝试补救")
563
+ json_str = fix_broken_json_string(json_str)
564
+ ai_result = json.loads(json_str)
565
+ OutputFormat(**ai_result)
566
+
559
567
  except ValidationError as e:
560
568
  log_ = "记忆卡片合并 - 大模型生成的格式未通过校验"
561
569
  logger.error(log_)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pro-craft
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -5,7 +5,7 @@ pro_craft/evals.py,sha256=1T86jur4k3cLk43j1GyAW4JS0nPNfl6P0ZOQmu-SgpA,1928
5
5
  pro_craft/file_manager.py,sha256=2j7lCt9L4mtvAy8_76ibTthXLwKKmVatWIB3DSvQM7U,3805
6
6
  pro_craft/log.py,sha256=MZf9jCZsiRoAq8v4FxVnJqeSXxgzAiiKf7mxz6bFtwM,4263
7
7
  pro_craft/prompt_helper.py,sha256=SFIhju0Y3rRdb-T1WocUgz7qCocq1Ja2zlaEZo1RM3o,23832
8
- pro_craft/prompt_helper_async.py,sha256=z0W4uDoxqCSBYlKtkXU1l_E1TUFz_9wMUWhV0rAGhNo,26408
8
+ pro_craft/prompt_helper_async.py,sha256=Cpm9G6c4nD3-4gjByIf9aoFvmqnetnn02RGI6fmh8aA,26726
9
9
  pro_craft/server.py,sha256=fPAosQIU0d7gxICiALl8u6QwbLI4cawVFyoRYebRES0,2827
10
10
  pro_craft/utils.py,sha256=27A3CFhbRsEAP5GY6oxAz2M-beiIuPgCNSjQUyzOVW0,5685
11
11
  pro_craft/code_helper/coder.py,sha256=NXglF1KiPtGe4HZN0MZvFJ8p9Iyd5kzIt72DQGgRwXA,24715
@@ -17,7 +17,7 @@ pro_craft/server/mcp/math.py,sha256=OOzGXx64nK4bOVlu33PtVddcCQ9ilqA3Em9yxjSX9cg,
17
17
  pro_craft/server/mcp/resource.py,sha256=z94jP3qZofO-1lZCM3TuOfLajw41HARs1ojXab1ymas,776
18
18
  pro_craft/server/mcp/weather.py,sha256=RAGuf4sgjlTQSfRRZ1Fo18JnuMQRS_Db9p6AqBQrl8E,455
19
19
  pro_craft/server/router/recommended.py,sha256=IAZFdmb8HSl2_TOJeuv5uOKIX47XyX4p4sEwxG-0vt0,9968
20
- pro_craft-0.1.8.dist-info/METADATA,sha256=i7V4hsLUgvdbdeFGW4FqsnqqxPMY9Hb6JjU6g4_7O0s,1768
21
- pro_craft-0.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- pro_craft-0.1.8.dist-info/top_level.txt,sha256=yqYDHArnYMWpeCxkmGRwlL6sJtxiOUnYylLDx9EOgFg,10
23
- pro_craft-0.1.8.dist-info/RECORD,,
20
+ pro_craft-0.1.9.dist-info/METADATA,sha256=FL2qNamudhOHu_VlUv8aax44i7P169qMOVLBHYjADio,1768
21
+ pro_craft-0.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ pro_craft-0.1.9.dist-info/top_level.txt,sha256=yqYDHArnYMWpeCxkmGRwlL6sJtxiOUnYylLDx9EOgFg,10
23
+ pro_craft-0.1.9.dist-info/RECORD,,