huggingface-hub 0.32.3__py3-none-any.whl → 0.32.4__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.
Potentially problematic release.
This version of huggingface-hub might be problematic. Click here for more details.
- huggingface_hub/__init__.py +1 -1
- huggingface_hub/inference/_client.py +1 -2
- huggingface_hub/inference/_generated/_async_client.py +1 -2
- huggingface_hub/inference/_mcp/_cli_hacks.py +2 -1
- huggingface_hub/inference/_mcp/mcp_client.py +3 -3
- {huggingface_hub-0.32.3.dist-info → huggingface_hub-0.32.4.dist-info}/METADATA +1 -1
- {huggingface_hub-0.32.3.dist-info → huggingface_hub-0.32.4.dist-info}/RECORD +11 -11
- {huggingface_hub-0.32.3.dist-info → huggingface_hub-0.32.4.dist-info}/LICENSE +0 -0
- {huggingface_hub-0.32.3.dist-info → huggingface_hub-0.32.4.dist-info}/WHEEL +0 -0
- {huggingface_hub-0.32.3.dist-info → huggingface_hub-0.32.4.dist-info}/entry_points.txt +0 -0
- {huggingface_hub-0.32.3.dist-info → huggingface_hub-0.32.4.dist-info}/top_level.txt +0 -0
huggingface_hub/__init__.py
CHANGED
|
@@ -1502,7 +1502,7 @@ class InferenceClient:
|
|
|
1502
1502
|
model_id = model or self.model
|
|
1503
1503
|
provider_helper = get_provider_helper(self.provider, task="question-answering", model=model_id)
|
|
1504
1504
|
request_parameters = provider_helper.prepare_request(
|
|
1505
|
-
inputs=
|
|
1505
|
+
inputs={"question": question, "context": context},
|
|
1506
1506
|
parameters={
|
|
1507
1507
|
"align_to_words": align_to_words,
|
|
1508
1508
|
"doc_stride": doc_stride,
|
|
@@ -1512,7 +1512,6 @@ class InferenceClient:
|
|
|
1512
1512
|
"max_seq_len": max_seq_len,
|
|
1513
1513
|
"top_k": top_k,
|
|
1514
1514
|
},
|
|
1515
|
-
extra_payload={"question": question, "context": context},
|
|
1516
1515
|
headers=self.headers,
|
|
1517
1516
|
model=model_id,
|
|
1518
1517
|
api_key=self.token,
|
|
@@ -1551,7 +1551,7 @@ class AsyncInferenceClient:
|
|
|
1551
1551
|
model_id = model or self.model
|
|
1552
1552
|
provider_helper = get_provider_helper(self.provider, task="question-answering", model=model_id)
|
|
1553
1553
|
request_parameters = provider_helper.prepare_request(
|
|
1554
|
-
inputs=
|
|
1554
|
+
inputs={"question": question, "context": context},
|
|
1555
1555
|
parameters={
|
|
1556
1556
|
"align_to_words": align_to_words,
|
|
1557
1557
|
"doc_stride": doc_stride,
|
|
@@ -1561,7 +1561,6 @@ class AsyncInferenceClient:
|
|
|
1561
1561
|
"max_seq_len": max_seq_len,
|
|
1562
1562
|
"top_k": top_k,
|
|
1563
1563
|
},
|
|
1564
|
-
extra_payload={"question": question, "context": context},
|
|
1565
1564
|
headers=self.headers,
|
|
1566
1565
|
model=model_id,
|
|
1567
1566
|
api_key=self.token,
|
|
@@ -73,8 +73,9 @@ async def _async_prompt(exit_event: asyncio.Event, prompt: str = "» ") -> str:
|
|
|
73
73
|
|
|
74
74
|
# Wait for user input or exit event
|
|
75
75
|
# Wait until either the user hits enter or exit_event is set
|
|
76
|
+
exit_task = asyncio.create_task(exit_event.wait())
|
|
76
77
|
await asyncio.wait(
|
|
77
|
-
[future,
|
|
78
|
+
[future, exit_task],
|
|
78
79
|
return_when=asyncio.FIRST_COMPLETED,
|
|
79
80
|
)
|
|
80
81
|
|
|
@@ -272,9 +272,6 @@ class MCPClient:
|
|
|
272
272
|
|
|
273
273
|
# Read from stream
|
|
274
274
|
async for chunk in response:
|
|
275
|
-
# Yield each chunk to caller
|
|
276
|
-
yield chunk
|
|
277
|
-
|
|
278
275
|
num_of_chunks += 1
|
|
279
276
|
delta = chunk.choices[0].delta if chunk.choices and len(chunk.choices) > 0 else None
|
|
280
277
|
if not delta:
|
|
@@ -304,6 +301,9 @@ class MCPClient:
|
|
|
304
301
|
if exit_if_first_chunk_no_tool and num_of_chunks <= 2 and len(final_tool_calls) == 0:
|
|
305
302
|
return
|
|
306
303
|
|
|
304
|
+
# Yield each chunk to caller
|
|
305
|
+
yield chunk
|
|
306
|
+
|
|
307
307
|
if message["content"]:
|
|
308
308
|
messages.append(message)
|
|
309
309
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: huggingface-hub
|
|
3
|
-
Version: 0.32.
|
|
3
|
+
Version: 0.32.4
|
|
4
4
|
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
|
|
5
5
|
Home-page: https://github.com/huggingface/huggingface_hub
|
|
6
6
|
Author: Hugging Face, Inc.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
huggingface_hub/__init__.py,sha256=
|
|
1
|
+
huggingface_hub/__init__.py,sha256=R8k-HmafEq-cYxRdFYM8fxWIj-0IjyKvMTb5R9-9QVA,50644
|
|
2
2
|
huggingface_hub/_commit_api.py,sha256=ZbmuIhFdF8B3F_cvGtxorka7MmIQOk8oBkCtYltnCvI,39456
|
|
3
3
|
huggingface_hub/_commit_scheduler.py,sha256=tfIoO1xWHjTJ6qy6VS6HIoymDycFPg0d6pBSZprrU2U,14679
|
|
4
4
|
huggingface_hub/_inference_endpoints.py,sha256=qXR0utAYRaEWTI8EXzAsDpVDcYpp8bJPEBbcOxRS52E,17413
|
|
@@ -43,10 +43,10 @@ huggingface_hub/commands/upload_large_folder.py,sha256=P-EO44JWVl39Ax4b0E0Z873d0
|
|
|
43
43
|
huggingface_hub/commands/user.py,sha256=_4rjCrP84KqtqCMn-r3YWLuGLrnklOWTdJFVTNFMLuU,7096
|
|
44
44
|
huggingface_hub/commands/version.py,sha256=vfCJn7GO1m-DtDmbdsty8_RTVtnZ7lX6MJsx0Bf4e-s,1266
|
|
45
45
|
huggingface_hub/inference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
-
huggingface_hub/inference/_client.py,sha256=
|
|
46
|
+
huggingface_hub/inference/_client.py,sha256=9XhzTsC-87iGfRLW0grvGp53f4tE2QvvNCmOsrd1vJU,161538
|
|
47
47
|
huggingface_hub/inference/_common.py,sha256=iwCkq2fWE1MVoPTeeXN7UN5FZi7g5fZ3K8PHSOCi5dU,14591
|
|
48
48
|
huggingface_hub/inference/_generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
huggingface_hub/inference/_generated/_async_client.py,sha256=
|
|
49
|
+
huggingface_hub/inference/_generated/_async_client.py,sha256=1rFYv_FcjaDW4F7L-QIYgkbWeFKgW6x3UdcZp1HYhZk,167698
|
|
50
50
|
huggingface_hub/inference/_generated/types/__init__.py,sha256=qI8Eu9WcBcKhVkLli6YniGHpfiJ9MLqtzmwXX35E7bA,6443
|
|
51
51
|
huggingface_hub/inference/_generated/types/audio_classification.py,sha256=Jg3mzfGhCSH6CfvVvgJSiFpkz6v4nNA0G4LJXacEgNc,1573
|
|
52
52
|
huggingface_hub/inference/_generated/types/audio_to_audio.py,sha256=2Ep4WkePL7oJwcp5nRJqApwviumGHbft9HhXE9XLHj4,891
|
|
@@ -81,11 +81,11 @@ huggingface_hub/inference/_generated/types/zero_shot_classification.py,sha256=BA
|
|
|
81
81
|
huggingface_hub/inference/_generated/types/zero_shot_image_classification.py,sha256=8J9n6VqFARkWvPfAZNWEG70AlrMGldU95EGQQwn06zI,1487
|
|
82
82
|
huggingface_hub/inference/_generated/types/zero_shot_object_detection.py,sha256=GUd81LIV7oEbRWayDlAVgyLmY596r1M3AW0jXDp1yTA,1630
|
|
83
83
|
huggingface_hub/inference/_mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
|
-
huggingface_hub/inference/_mcp/_cli_hacks.py,sha256=
|
|
84
|
+
huggingface_hub/inference/_mcp/_cli_hacks.py,sha256=cMZirVFe4N0EM9Nzzs9aEmzUBUEBYR4oYZpByTWlZCM,3182
|
|
85
85
|
huggingface_hub/inference/_mcp/agent.py,sha256=azX9_lsFjNlgsEvRYdKgsmOmpNReWIcbuMeIVWc852k,4264
|
|
86
86
|
huggingface_hub/inference/_mcp/cli.py,sha256=6WP2bqdfSj80IYdwnzwO4ilEb7PgghgctD4iLV4ydqg,8588
|
|
87
87
|
huggingface_hub/inference/_mcp/constants.py,sha256=tE_V6qcvsmvVoJa4eg04jhoTR2Cx1cNHieY2ENrm1_M,2511
|
|
88
|
-
huggingface_hub/inference/_mcp/mcp_client.py,sha256=
|
|
88
|
+
huggingface_hub/inference/_mcp/mcp_client.py,sha256=jLIw_fkIPCGYbKI-T2C5UkYmCECJRGNGGw7gnVmXQ_s,14130
|
|
89
89
|
huggingface_hub/inference/_mcp/utils.py,sha256=K7rr4FxCh9OYWwYNlnvQraNLy9y3z-5yVMBIaoCQMjA,4052
|
|
90
90
|
huggingface_hub/inference/_providers/__init__.py,sha256=IrLTMERrbRuPiVdBQEMK9TMvXrsGId4-u2ucMkG-vTU,7671
|
|
91
91
|
huggingface_hub/inference/_providers/_common.py,sha256=Octgz-PbHw62iW3Oa8rF7rxvBJR0ZmL4ouv3NoX-weE,10131
|
|
@@ -138,9 +138,9 @@ huggingface_hub/utils/insecure_hashlib.py,sha256=iAaepavFZ5Dhfa5n8KozRfQprKmvcjS
|
|
|
138
138
|
huggingface_hub/utils/logging.py,sha256=0A8fF1yh3L9Ka_bCDX2ml4U5Ht0tY8Dr3JcbRvWFuwo,4909
|
|
139
139
|
huggingface_hub/utils/sha.py,sha256=OFnNGCba0sNcT2gUwaVCJnldxlltrHHe0DS_PCpV3C4,2134
|
|
140
140
|
huggingface_hub/utils/tqdm.py,sha256=xAKcyfnNHsZ7L09WuEM5Ew5-MDhiahLACbbN2zMmcLs,10671
|
|
141
|
-
huggingface_hub-0.32.
|
|
142
|
-
huggingface_hub-0.32.
|
|
143
|
-
huggingface_hub-0.32.
|
|
144
|
-
huggingface_hub-0.32.
|
|
145
|
-
huggingface_hub-0.32.
|
|
146
|
-
huggingface_hub-0.32.
|
|
141
|
+
huggingface_hub-0.32.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
142
|
+
huggingface_hub-0.32.4.dist-info/METADATA,sha256=fwKn_Cxqvf8nVJPKBrc4TjfvAdCFZECGPjEBsBJkrhM,14777
|
|
143
|
+
huggingface_hub-0.32.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
144
|
+
huggingface_hub-0.32.4.dist-info/entry_points.txt,sha256=uelw0-fu0kd-CxIuOsR1bsjLIFnAaMQ6AIqluJYDhQw,184
|
|
145
|
+
huggingface_hub-0.32.4.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
|
|
146
|
+
huggingface_hub-0.32.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|