fix double 'content', but I noticed that I did the same thing as the previous push. I'm not sure I understand why there is a difference between .mdx and .ipynb. To me, both changes are consistent.
WilliamRabuel
f4ebbdc
Add 'Observation:\\n' prefix in notebook prompt builder
Hello,
This commit corrects a prompt formatting issue in the unit1/dummy_agent_library.ipynb notebook.
The Problem:
The original code that builds the prompt for the second LLM call (after executing the tool) was missing the required "Observation:" prefix before adding the tool's output. This was happening in the cell where the messages history is updated.
This incorrect formatting breaks the Thought -> Action -> Observation cycle that the system prompt explicitly instructs the model to follow. As a result, the model would get confused and generate incorrect or unpredictable responses, such as hallucinating its own Observation: line instead of reasoning on the one provided.
The Solution:
I have updated the code to explicitly add the "Observation:\n" string between the first model output (Thought/Action) and the result of the get_weather() function call.
# Before
{"role": "assistant", "content": output.choices[0].message.content + get_weather('London')}
# After
{"role": "assistant", "…