hjxdl 0.3.31__py3-none-any.whl → 0.3.33__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 +9 -4
- hdl/utils/llm/llm_wrapper.py +17 -7
- {hjxdl-0.3.31.dist-info → hjxdl-0.3.33.dist-info}/METADATA +1 -1
- {hjxdl-0.3.31.dist-info → hjxdl-0.3.33.dist-info}/RECORD +7 -7
- {hjxdl-0.3.31.dist-info → hjxdl-0.3.33.dist-info}/WHEEL +1 -1
- {hjxdl-0.3.31.dist-info → hjxdl-0.3.33.dist-info}/LICENSE +0 -0
- {hjxdl-0.3.31.dist-info → hjxdl-0.3.33.dist-info}/top_level.txt +0 -0
hdl/_version.py
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
# file generated by
|
1
|
+
# file generated by setuptools-scm
|
2
2
|
# don't change, don't track in version control
|
3
|
+
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
5
|
+
|
3
6
|
TYPE_CHECKING = False
|
4
7
|
if TYPE_CHECKING:
|
5
|
-
from typing import Tuple
|
8
|
+
from typing import Tuple
|
9
|
+
from typing import Union
|
10
|
+
|
6
11
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
7
12
|
else:
|
8
13
|
VERSION_TUPLE = object
|
@@ -12,5 +17,5 @@ __version__: str
|
|
12
17
|
__version_tuple__: VERSION_TUPLE
|
13
18
|
version_tuple: VERSION_TUPLE
|
14
19
|
|
15
|
-
__version__ = version = '0.3.
|
16
|
-
__version_tuple__ = version_tuple = (0, 3,
|
20
|
+
__version__ = version = '0.3.33'
|
21
|
+
__version_tuple__ = version_tuple = (0, 3, 33)
|
hdl/utils/llm/llm_wrapper.py
CHANGED
@@ -144,6 +144,7 @@ class OpenAIWrapper(object):
|
|
144
144
|
image_keys: tuple = ("image_url", "url"),
|
145
145
|
model: str=None,
|
146
146
|
tools: list = None,
|
147
|
+
tool_choice: str = "auto",
|
147
148
|
stream: bool = True,
|
148
149
|
response_model = None,
|
149
150
|
**kwargs: t.Any,
|
@@ -236,13 +237,22 @@ class OpenAIWrapper(object):
|
|
236
237
|
"content": assis_info
|
237
238
|
})
|
238
239
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
240
|
+
if tools:
|
241
|
+
resp = client.chat.completions.create(
|
242
|
+
model=model,
|
243
|
+
messages=messages,
|
244
|
+
tools=tools,
|
245
|
+
tool_choice=tool_choice,
|
246
|
+
stream=stream,
|
247
|
+
**kwargs
|
248
|
+
)
|
249
|
+
else:
|
250
|
+
resp = client.chat.completions.create(
|
251
|
+
model=model,
|
252
|
+
messages=messages,
|
253
|
+
stream=stream,
|
254
|
+
**kwargs
|
255
|
+
)
|
246
256
|
return resp
|
247
257
|
|
248
258
|
def invoke(
|
@@ -1,5 +1,5 @@
|
|
1
1
|
hdl/__init__.py,sha256=GffnD0jLJdhkd-vo989v40N90sQbofkayRBwxc6TVhQ,72
|
2
|
-
hdl/_version.py,sha256=
|
2
|
+
hdl/_version.py,sha256=ZxUpRkxGjsUn4L6yqM2Eq_du_OiStfoVUrd-eixyn44,513
|
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
|
@@ -136,15 +136,15 @@ hdl/utils/llm/chatgr.py,sha256=5F5PJHe8vz3iCfi4TT54DCLRi1UeJshECdVtgvvvao0,3696
|
|
136
136
|
hdl/utils/llm/embs.py,sha256=Tf0FOYrOFZp7qQpEPiSCXzlgyHH0X9HVTUtsup74a9E,7174
|
137
137
|
hdl/utils/llm/extract.py,sha256=2sK_WJzmYIc8iuWaM9DA6Nw3_6q1O4lJ5pKpcZo-bBA,6512
|
138
138
|
hdl/utils/llm/llama_chat.py,sha256=watcHGOaz-bv3x-yDucYlGk5f8FiqfFhwWogrl334fk,4387
|
139
|
-
hdl/utils/llm/llm_wrapper.py,sha256=
|
139
|
+
hdl/utils/llm/llm_wrapper.py,sha256=ZjmogEM0TrvlM83LG6l5t8CFnMThBWUmUOvA5WY9ODo,15309
|
140
140
|
hdl/utils/llm/vis.py,sha256=SSP6tOwKLq0hWcpM3twI9TitqzBmKjlcGrnXEWYlCzM,26055
|
141
141
|
hdl/utils/llm/visrag.py,sha256=0i-VrxqgiV-J7R3VPshu9oc7-rKjFJOldYik3HDXj6M,10176
|
142
142
|
hdl/utils/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
143
143
|
hdl/utils/schedulers/norm_lr.py,sha256=bDwCmdEK-WkgxQMFBiMuchv8Mm7C0-GZJ6usm-PQk14,4461
|
144
144
|
hdl/utils/weather/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
145
145
|
hdl/utils/weather/weather.py,sha256=k11o6wM15kF8b9NMlEfrg68ak-SfSYLN3nOOflFUv-I,4381
|
146
|
-
hjxdl-0.3.
|
147
|
-
hjxdl-0.3.
|
148
|
-
hjxdl-0.3.
|
149
|
-
hjxdl-0.3.
|
150
|
-
hjxdl-0.3.
|
146
|
+
hjxdl-0.3.33.dist-info/LICENSE,sha256=lkMiSbeZHBQLB9LJEkS9-L3Z-LBC4yGnKrzHSG8RkPM,2599
|
147
|
+
hjxdl-0.3.33.dist-info/METADATA,sha256=u_aCYfjadGcSfCmnDY8eQuic1GblWIA78DzSRrF6Nbc,1336
|
148
|
+
hjxdl-0.3.33.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
149
|
+
hjxdl-0.3.33.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
|
150
|
+
hjxdl-0.3.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|