hjxdl 0.3.23__py3-none-any.whl → 0.3.25__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.
hdl/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.3.23'
16
- __version_tuple__ = version_tuple = (0, 3, 23)
15
+ __version__ = version = '0.3.25'
16
+ __version_tuple__ = version_tuple = (0, 3, 25)
hdl/utils/desc/tools.py CHANGED
@@ -3,7 +3,7 @@ TOOL_DICT = {
3
3
  "type": "function",
4
4
  "function": {
5
5
  "name": "get_weather",
6
- "description": "Get current temperature for a given location.",
6
+ "description": "仅在用户明确询问天气、气候、气温等信息时,获取指定城市的天气情况。",
7
7
  "parameters": {
8
8
  "type": "object",
9
9
  "properties": {
@@ -322,7 +322,7 @@ class OpenAIWrapper(object):
322
322
  choice = chunk.choices[0]
323
323
 
324
324
  # 如果返回了 tool_calls
325
- if hasattr(choice.delta, 'tool_calls') and choice.finish_reason == 'tool_calls':
325
+ if hasattr(choice.delta, 'tool_calls') and choice.delta.tool_calls:
326
326
  tool_calls = choice.delta.tool_calls
327
327
  if tool_calls: # 防止为空
328
328
  yield {
@@ -332,7 +332,7 @@ class OpenAIWrapper(object):
332
332
  return # 直接返回,结束流式输出
333
333
 
334
334
  # 返回文本内容
335
- if hasattr(choice.delta, 'content'):
335
+ elif hasattr(choice.delta, 'content'):
336
336
  yield {
337
337
  "type": "text",
338
338
  "content": choice.delta.content
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: hjxdl
3
- Version: 0.3.23
3
+ Version: 0.3.25
4
4
  Summary: A collection of functions for Jupyter notebooks
5
5
  Home-page: https://github.com/huluxiaohuowa/hdl
6
6
  Author: Jianxing Hu
@@ -1,5 +1,5 @@
1
1
  hdl/__init__.py,sha256=GffnD0jLJdhkd-vo989v40N90sQbofkayRBwxc6TVhQ,72
2
- hdl/_version.py,sha256=Li8JkxhYfS5RJsRP9TE94VsfPVxFjJHFIPlVKBeP0UY,413
2
+ hdl/_version.py,sha256=dVlGOpia94Q47QgikqaZwc65NYGBcDs1IEvuvdQqOAU,413
3
3
  hdl/args/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  hdl/args/loss_args.py,sha256=s7YzSdd7IjD24rZvvOrxLLFqMZQb9YylxKeyelSdrTk,70
5
5
  hdl/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -124,7 +124,7 @@ hdl/utils/database_tools/web.py,sha256=awJ8lafL-2KRjf3V1uuij8JIvX9U5fI8fLZKOkOvq
124
124
  hdl/utils/desc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
125
  hdl/utils/desc/func_desc.py,sha256=sHmVZZmV7Zgii--gnHqMs6fTb7HVkqTOf8Pl_0F6qlI,3808
126
126
  hdl/utils/desc/template.py,sha256=Kf_tbL-XkDCKNQ3UncbCuYEeUgXEa7kRVCf9TD2b8og,2526
127
- hdl/utils/desc/tools.py,sha256=KNxmmTFFL3BZPh-2NGvNPz2VygHPJ3BWFa4VY2jy58g,619
127
+ hdl/utils/desc/tools.py,sha256=tovV4sqjMBCHI6PG5YGJYBKpoXRhgYilzt77ZYTL7Jk,673
128
128
  hdl/utils/general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
129
129
  hdl/utils/general/glob.py,sha256=Zuf7WHU0UdUPOs9UrhxmrCiMC8GrHxQU6n3mTThv6yc,1120
130
130
  hdl/utils/general/runners.py,sha256=x7QBolp3MrqNV6L4rB6Ueybr26bqkRFZTuXhY0SwyLk,3061
@@ -134,15 +134,15 @@ hdl/utils/llm/chatgr.py,sha256=5F5PJHe8vz3iCfi4TT54DCLRi1UeJshECdVtgvvvao0,3696
134
134
  hdl/utils/llm/embs.py,sha256=Tf0FOYrOFZp7qQpEPiSCXzlgyHH0X9HVTUtsup74a9E,7174
135
135
  hdl/utils/llm/extract.py,sha256=2sK_WJzmYIc8iuWaM9DA6Nw3_6q1O4lJ5pKpcZo-bBA,6512
136
136
  hdl/utils/llm/llama_chat.py,sha256=watcHGOaz-bv3x-yDucYlGk5f8FiqfFhwWogrl334fk,4387
137
- hdl/utils/llm/llm_wrapper.py,sha256=gHG-VNTUmLcTs5xtAtmnjOiSJRoBbvsiduPQyUWH8pA,13729
137
+ hdl/utils/llm/llm_wrapper.py,sha256=sdf6N19pmwXBCYvHfFv8VVPPBpu5SIyXu21W3bFXSx0,13718
138
138
  hdl/utils/llm/vis.py,sha256=SSP6tOwKLq0hWcpM3twI9TitqzBmKjlcGrnXEWYlCzM,26055
139
139
  hdl/utils/llm/visrag.py,sha256=0i-VrxqgiV-J7R3VPshu9oc7-rKjFJOldYik3HDXj6M,10176
140
140
  hdl/utils/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
141
141
  hdl/utils/schedulers/norm_lr.py,sha256=bDwCmdEK-WkgxQMFBiMuchv8Mm7C0-GZJ6usm-PQk14,4461
142
142
  hdl/utils/weather/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
143
  hdl/utils/weather/weather.py,sha256=k11o6wM15kF8b9NMlEfrg68ak-SfSYLN3nOOflFUv-I,4381
144
- hjxdl-0.3.23.dist-info/LICENSE,sha256=lkMiSbeZHBQLB9LJEkS9-L3Z-LBC4yGnKrzHSG8RkPM,2599
145
- hjxdl-0.3.23.dist-info/METADATA,sha256=llZdZm3Z6-1VOhNdOgVHGwtW1mDAy2kfCYm85r5O-Eg,1336
146
- hjxdl-0.3.23.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
147
- hjxdl-0.3.23.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
148
- hjxdl-0.3.23.dist-info/RECORD,,
144
+ hjxdl-0.3.25.dist-info/LICENSE,sha256=lkMiSbeZHBQLB9LJEkS9-L3Z-LBC4yGnKrzHSG8RkPM,2599
145
+ hjxdl-0.3.25.dist-info/METADATA,sha256=juP33f_IfmDnggT6_9LN7RM49Kh31xBItp855s-u3lc,1336
146
+ hjxdl-0.3.25.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
147
+ hjxdl-0.3.25.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
148
+ hjxdl-0.3.25.dist-info/RECORD,,
File without changes