adam-community 1.0.18__py3-none-any.whl → 1.0.19__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.
@@ -1 +1 @@
1
- __version__ = "1.0.18"
1
+ __version__ = "1.0.19"
adam_community/util.py CHANGED
@@ -64,7 +64,20 @@ class RAG:
64
64
  return e.stderr.strip()
65
65
 
66
66
  try:
67
- return "\n".join(json.loads(result.stdout))
67
+ parsed_data = json.loads(result.stdout)
68
+ # 如果返回的是数组,直接使用
69
+ if isinstance(parsed_data, list):
70
+ return "\n".join(parsed_data)
71
+ # 如果返回的是对象且包含 text 字段,使用 text 字段
72
+ elif isinstance(parsed_data, dict) and "text" in parsed_data:
73
+ text_array = parsed_data["text"]
74
+ if isinstance(text_array, list):
75
+ return "\n".join(text_array)
76
+ else:
77
+ return str(text_array)
78
+ else:
79
+ # 其他情况返回原始输出
80
+ return result.stdout
68
81
  except Exception as e:
69
82
  logger.error(e)
70
83
  return result.stdout
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: adam_community
3
- Version: 1.0.18
3
+ Version: 1.0.19
4
4
  Summary: Adam Community Tools and Utilities
5
5
  Home-page: https://github.com/yourusername/adam-community
6
6
  Author: Adam Community
@@ -1,7 +1,7 @@
1
1
  adam_community/__init__.py,sha256=vAmF9VQR6D4peppH0hnrHDmZK5cFeFPh11GIsTKUXhE,429
2
- adam_community/__version__.py,sha256=4Q9JfUgIQNLvUFicJMyEkNm8HoOBiK9BeIp9ImHf4Bg,23
2
+ adam_community/__version__.py,sha256=3HJlki3WDXw4aYwHo9LB3tzME44RgDb7PUJ_5NVNfA4,23
3
3
  adam_community/tool.py,sha256=CCzWosxtuZ0yk7mupmnlgMpO59jr1hl-a_brSGIqhDI,4867
4
- adam_community/util.py,sha256=CAyMS-UNFjDcdSRWNCIOseAvprP0GEpfJzhO3l5VY1U,11051
4
+ adam_community/util.py,sha256=VJVXOWbnwmYAL3K0i4X_yItdmxEnC-IgyuVW74kTU4U,11664
5
5
  adam_community/cli/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
6
6
  adam_community/cli/build.py,sha256=R9Lj9FOCI1-GASlyRyp_hX7_spPxgenTSMduXYYAmmE,12579
7
7
  adam_community/cli/cli.py,sha256=xlPvn0aq3TpAPjA7z9shsCqR1aHDVtZuhvtc_SNA_cQ,2811
@@ -25,8 +25,8 @@ adam_community/cli/templates/long_description.md.j2,sha256=Rj6hcuNzEL0Sp17GQVCRJ
25
25
  adam_community/cli/templates/long_description_en.md.j2,sha256=xSbahwGarXlWopZqHw7lrcv1dQuvwj2ChhZv5pJmUy4,1725
26
26
  adam_community/cli/templates/rag_python.py.j2,sha256=YJL7-WIx-Dumt7lHuUGxl3Rbaw0kpkh8hpcCJ5lz9lA,2494
27
27
  adam_community/cli/templates/toolbox_python.py.j2,sha256=EOnmsJUvQRrcO7K7c88kI42gMmcM0Z4ab46qwOJXbH8,4192
28
- adam_community-1.0.18.dist-info/METADATA,sha256=QeMl-2UkZS9k_ccIRKPh5djwJC_cUc-Y8GMdDoGf7CA,2172
29
- adam_community-1.0.18.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
30
- adam_community-1.0.18.dist-info/entry_points.txt,sha256=4I7yRkn7cHwPY8-fWQLeAvKjc24zUy8Z65VsZNs0Wos,56
31
- adam_community-1.0.18.dist-info/top_level.txt,sha256=MS8jbePXKZChih9kGizNVX0I1MFZFGWBMCIW_r86qhU,15
32
- adam_community-1.0.18.dist-info/RECORD,,
28
+ adam_community-1.0.19.dist-info/METADATA,sha256=KUkh2oew3a2Q7EMRyIW9XIn__bR5CURp1Td0k2C3c_o,2172
29
+ adam_community-1.0.19.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
30
+ adam_community-1.0.19.dist-info/entry_points.txt,sha256=4I7yRkn7cHwPY8-fWQLeAvKjc24zUy8Z65VsZNs0Wos,56
31
+ adam_community-1.0.19.dist-info/top_level.txt,sha256=MS8jbePXKZChih9kGizNVX0I1MFZFGWBMCIW_r86qhU,15
32
+ adam_community-1.0.19.dist-info/RECORD,,