pycoze 0.1.47__py3-none-any.whl → 0.1.49__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.
@@ -60,21 +60,21 @@ def create_openai_func_call_agent_executor(
60
60
  last_message = messages[-1]
61
61
  if last_message.content.strip().endswith("```"):
62
62
  last_message.content = last_message.content + "\n\n" # 避免影响阅读
63
- if not last_message.tool_calls:
64
- if (
65
- "接下来我将" in last_message.content
66
- or "接下来,我将" in last_message.content
67
- ):
68
- print("deepseek的bug: “接下来我将” 模式,使用a_delay_function骗过llm")
69
- last_message.additional_kwargs["tool_calls"] = (
70
- last_message.tool_calls
71
- ) = [
72
- {
73
- "function": {"name": "a_delay_function", "arguments": "{}"},
74
- "id": random.randint(0, 1000000),
75
- }
76
- ]
77
- return "continue"
63
+ # if not last_message.tool_calls:
64
+ # if (
65
+ # "接下来我将" in last_message.content
66
+ # or "接下来,我将" in last_message.content
67
+ # ):
68
+ # print("deepseek的bug: “接下来我将” 模式,使用a_delay_function骗过llm")
69
+ # last_message.additional_kwargs["tool_calls"] = (
70
+ # last_message.tool_calls
71
+ # ) = [
72
+ # {
73
+ # "function": {"name": "a_delay_function", "arguments": "{}"},
74
+ # "id": random.randint(0, 1000000),
75
+ # }
76
+ # ]
77
+ # return "continue"
78
78
  if (
79
79
  '"name"' in last_message.content
80
80
  and '"parameters":' in last_message.content
pycoze/bot/bot.py CHANGED
@@ -47,7 +47,7 @@ def agent_chat(bot_setting_file, history):
47
47
  prompt = role_setting["prompt"]
48
48
  if cfg["model"].startswith("deepseek") and len(tools) > 0:
49
49
  prompt += """
50
- 如果需要调用工具,请使用以下面markdown的json格式进行结尾:
50
+ 如果需要调用工具,请使用以正确的json格式进行结尾(务必保证json格式正确):
51
51
  ```json
52
52
  {"name": 函数名, "parameters": 参数词典}
53
53
  ```
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycoze
3
- Version: 0.1.47
3
+ Version: 0.1.49
4
4
  Summary: Package for pycoze only!
5
5
  Author: Yuan Jie Xiong
6
6
  Author-email: aiqqqqqqq@qq.com
@@ -3,13 +3,13 @@ pycoze/module.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  pycoze/access/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  pycoze/access/tool_for_bot.py,sha256=Nv6XlxcqaLaMVQNDkpcthlqaSxyfHoOfWiTScQXO22Y,2656
5
5
  pycoze/bot/__init__.py,sha256=pciDtfcIXda7iFt9uI5Fpm0JKpGBhdXHmJv4966WTVU,21
6
- pycoze/bot/bot.py,sha256=THRLu45TLzK6Np6m7122q0OdAPQDqKfGLuEt_BNPdog,2521
6
+ pycoze/bot/bot.py,sha256=SmiZLRbaH595tOS_siyDHYJ076ANgADUU06-2JsH3dQ,2547
7
7
  pycoze/bot/agent/__init__.py,sha256=IaYqQCJ3uBor92JdOxI_EY4HtYOHgej8lijr3UrN1Vc,161
8
8
  pycoze/bot/agent/agent.py,sha256=uEkPpHX3xODlDjj2Qz90N9bSdCIQzW9wHxOpxvIegzo,4367
9
9
  pycoze/bot/agent/assistant.py,sha256=QLeWaPi415P9jruYOm8qcIbC94cXXAhJYmLTkyC9NTQ,1267
10
10
  pycoze/bot/agent/chat.py,sha256=kc0qgcrBSXdiMy49JwThZTV-0PAvzAhiUvbI5ILiSnU,571
11
11
  pycoze/bot/agent/agent_types/__init__.py,sha256=W2jTNMLqUMqgCMG0Tw0d8n7WpsbsnIonqaPR-YLegLU,210
12
- pycoze/bot/agent/agent_types/openai_func_call_agent.py,sha256=EaK0CL69teGuKsoYUrvcvDhcSWLLFyJEL0SHTGpze2E,8207
12
+ pycoze/bot/agent/agent_types/openai_func_call_agent.py,sha256=WEE5BcxAxtGXz9itHaFzUb_oXEw4BsS-qCrbURkS0jg,8297
13
13
  pycoze/bot/agent/agent_types/react_agent.py,sha256=AnjHwHXVwLAm77ndglJGi4rQhqDGWaLuUfl46uZVSzM,6749
14
14
  pycoze/bot/agent/agent_types/react_prompt.py,sha256=jyovokGaPzNIe5bvTRvn0gmsWLx5kpDIPmRwmEMCl-M,2142
15
15
  pycoze/gpu/__init__.py,sha256=cuxwDdz2Oo-VcwZ50FtFtEIJXdqoz2el-n0QpSt_NMc,75
@@ -22,8 +22,8 @@ pycoze/ui/ui_def.py,sha256=CNFYH8NC-WYmbceIPpxsRr9H6O006pMKukx7U-BOE1Q,3744
22
22
  pycoze/utils/__init__.py,sha256=KExBkotf23dr2NfTEouWke5nJB1q2IuDXgHrmuyd95k,73
23
23
  pycoze/utils/arg.py,sha256=rRujm1zKc0XlnNlpIJ6JAAaFiTzDGmL_RliIpSc5OD8,724
24
24
  pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
25
- pycoze-0.1.47.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
26
- pycoze-0.1.47.dist-info/METADATA,sha256=zcLkpDCvuWtCbTcL6c5kUmz14GItN7gNLm8hGur3sEU,719
27
- pycoze-0.1.47.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
28
- pycoze-0.1.47.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
29
- pycoze-0.1.47.dist-info/RECORD,,
25
+ pycoze-0.1.49.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
26
+ pycoze-0.1.49.dist-info/METADATA,sha256=dixp2ZvnoA3HKfLybH7fXpbqkeXLXwKhURMzv5CN-DU,719
27
+ pycoze-0.1.49.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
28
+ pycoze-0.1.49.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
29
+ pycoze-0.1.49.dist-info/RECORD,,