hjxdl 0.1.9__py3-none-any.whl → 0.1.11__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 +2 -2
- hdl/utils/llm/chat.py +18 -7
- {hjxdl-0.1.9.dist-info → hjxdl-0.1.11.dist-info}/METADATA +1 -1
- {hjxdl-0.1.9.dist-info → hjxdl-0.1.11.dist-info}/RECORD +6 -6
- {hjxdl-0.1.9.dist-info → hjxdl-0.1.11.dist-info}/WHEEL +0 -0
- {hjxdl-0.1.9.dist-info → hjxdl-0.1.11.dist-info}/top_level.txt +0 -0
hdl/_version.py
CHANGED
hdl/utils/llm/chat.py
CHANGED
@@ -327,19 +327,30 @@ class OpenAI_M():
|
|
327
327
|
*args,
|
328
328
|
**kwargs
|
329
329
|
):
|
330
|
-
"""Initialize the
|
330
|
+
"""Initialize the OpenAI client.
|
331
331
|
|
332
332
|
Args:
|
333
|
-
model_path (str
|
334
|
-
device (str
|
335
|
-
generation_kwargs (dict
|
336
|
-
server_ip (str
|
337
|
-
server_port (int
|
333
|
+
model_path (str): Path to the model file. Defaults to "default_model".
|
334
|
+
device (str): Device to use for model inference. Defaults to 'gpu'.
|
335
|
+
generation_kwargs (dict): Additional keyword arguments for model generation. Defaults to {}.
|
336
|
+
server_ip (str): IP address of the server. Defaults to "172.28.1.2".
|
337
|
+
server_port (int): Port number of the server. Defaults to 8000.
|
338
|
+
api_key (str): API key for authentication. Defaults to "dummy_key".
|
339
|
+
*args: Variable length argument list.
|
340
|
+
**kwargs: Arbitrary keyword arguments.
|
341
|
+
|
342
|
+
Attributes:
|
343
|
+
model_path (str): Path to the model file.
|
344
|
+
server_ip (str): IP address of the server.
|
345
|
+
server_port (int): Port number of the server.
|
346
|
+
base_url (str): Base URL for API requests.
|
347
|
+
api_key (str): API key for authentication.
|
348
|
+
client (OpenAI): OpenAI client for making API requests.
|
338
349
|
"""
|
339
350
|
self.model_path = model_path
|
340
351
|
self.server_ip = server_ip
|
341
352
|
self.server_port = server_port
|
342
|
-
self.base_url = "http://{self.server_ip}:{str(self.server_port)}/v1"
|
353
|
+
self.base_url = f"http://{self.server_ip}:{str(self.server_port)}/v1"
|
343
354
|
self.api_key = api_key
|
344
355
|
self.client = OpenAI(
|
345
356
|
base_url=self.base_url,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
hdl/__init__.py,sha256=5sZZNySv08wwfzJcSDssGTqUn9wlmDsR6R4XB8J8mFM,70
|
2
|
-
hdl/_version.py,sha256=
|
2
|
+
hdl/_version.py,sha256=HreDwlLXV189L3kiBj3huM_kqWD1usijlC8LN1YXcCM,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
|
@@ -84,12 +84,12 @@ hdl/utils/database_tools/connect.py,sha256=KUnVG-8raifEJ_N0b3c8LkTTIfn9NIyw8LX6q
|
|
84
84
|
hdl/utils/general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
85
85
|
hdl/utils/general/glob.py,sha256=8-RCnt6L297wMIfn34ZAMCsGCZUjHG3MGglGZI1cX0g,491
|
86
86
|
hdl/utils/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
87
|
-
hdl/utils/llm/chat.py,sha256=
|
87
|
+
hdl/utils/llm/chat.py,sha256=WElHLIi9kEU2v_42moqSp9b4UYCwB5xow1rTsi1HMRc,14854
|
88
88
|
hdl/utils/llm/embs.py,sha256=Tf0FOYrOFZp7qQpEPiSCXzlgyHH0X9HVTUtsup74a9E,7174
|
89
89
|
hdl/utils/llm/extract.py,sha256=2sK_WJzmYIc8iuWaM9DA6Nw3_6q1O4lJ5pKpcZo-bBA,6512
|
90
90
|
hdl/utils/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
91
91
|
hdl/utils/schedulers/norm_lr.py,sha256=bDwCmdEK-WkgxQMFBiMuchv8Mm7C0-GZJ6usm-PQk14,4461
|
92
|
-
hjxdl-0.1.
|
93
|
-
hjxdl-0.1.
|
94
|
-
hjxdl-0.1.
|
95
|
-
hjxdl-0.1.
|
92
|
+
hjxdl-0.1.11.dist-info/METADATA,sha256=0xzd32HG6sfj4SDK9zdrwb-fD5leA6JqunVVTB4wpc0,543
|
93
|
+
hjxdl-0.1.11.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
94
|
+
hjxdl-0.1.11.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
|
95
|
+
hjxdl-0.1.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|