huggingface / huggingface/agents-course
[HANDS-ON BUG] UNIT1 code cant run
- Dominant language
- MDX
- Stars
- 32.6k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
https://huggingface.co/learn/agents-course/en/unit1/dummy-agent-library
in this section last code clip like this
messages=[
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": "What's the weather in London ?"},
{"role": "assistant", "content": output.choices[0].message.content + "Observation:\n" + get_weather('London')},
]
output = client.chat.completions.create(
messages=messages,
stream=False,
max_tokens=200,
)
print(output.choices[0].message.content)
messages depends output, output depends messages, A circular dependency was formed.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Unit 1 dummy-agent-library section linked in the issue and reproduce the final code example. Check the construction of messages and the chat completion call; done means the example runs without the reported circular dependency and prints the assistant response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100