You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I try to send a message to my agent created with smolagent I get this error:
╭────────────────────────────────── New run ───────────────────────────────────╮
│ │
│ hello │
│ │
╰─ HfApiModel - Qwen/Qwen2.5-Coder-32B-Instruct ───────────────────────────────╯
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Error in generating model output:
401 Client Error: Unauthorized for url: https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruc
t/v1/chat/completions (Request ID:
Root=1-67b8da1f-1e195d3648979d905facf775;086617d1-6834-4aa1-bfde-99f5e767bd3e)
Invalid username or password.
[Step 1: Duration 0.03 seconds]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 715, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2088, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1647, in call_function
prediction = await utils.async_iteration(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 728, in async_iteration
return await anext(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 722, in anext
return await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2461, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 962, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 705, in run_sync_iterator_async
return next(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 866, in gen_wrapper
response = next(iterator)
File "/home/user/app/Gradio_UI.py", line 197, in interact_with_agent
for msg in stream_to_gradio(self.agent, task=prompt, reset_agent_memory=False):
File "/home/user/app/Gradio_UI.py", line 145, in stream_to_gradio
total_input_tokens += agent.model.last_input_token_count
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
Describe the bug
When I try to send a message to my agent created with smolagent I get this error:
╭────────────────────────────────── New run ───────────────────────────────────╮
│ │
│ hello │
│ │
╰─ HfApiModel - Qwen/Qwen2.5-Coder-32B-Instruct ───────────────────────────────╯
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Error in generating model output:
401 Client Error: Unauthorized for url:
https://router.huggingface.co/hf-inference/models/Qwen/Qwen2.5-Coder-32B-Instruc
t/v1/chat/completions (Request ID:
Root=1-67b8da1f-1e195d3648979d905facf775;086617d1-6834-4aa1-bfde-99f5e767bd3e)
Invalid username or password.
[Step 1: Duration 0.03 seconds]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 715, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 2088, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1647, in call_function
prediction = await utils.async_iteration(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 728, in async_iteration
return await anext(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 722, in anext
return await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2461, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 962, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 705, in run_sync_iterator_async
return next(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 866, in gen_wrapper
response = next(iterator)
File "/home/user/app/Gradio_UI.py", line 197, in interact_with_agent
for msg in stream_to_gradio(self.agent, task=prompt, reset_agent_memory=False):
File "/home/user/app/Gradio_UI.py", line 145, in stream_to_gradio
total_input_tokens += agent.model.last_input_token_count
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
I encounter a similar error when running the template agent: https://huggingface.co/spaces/agents-course/First_agent_template
The text was updated successfully, but these errors were encountered: