docs: Update method name for structured output in Ollama docs#807
docs: Update method name for structured output in Ollama docs#807apikodes wants to merge 3 commits intostrands-agents:mainfrom
Conversation
|
Assessment: Request Changes The intent of this PR is correct — the Per the project's own structured output documentation, # Deprecated
result = agent.structured_output(MyModel, "prompt")
print(result.field)
# Recommended
result = agent("prompt", structured_output_model=MyModel)
print(result.structured_output.field)The code example and the explanatory text both need to be updated to reflect this parameter-based invocation pattern. See inline comments for specific suggestions. Thank you for identifying the deprecation issue — just needs the correct replacement pattern! |
Documentation Preview ReadyYour documentation preview has been successfully deployed! Preview URL: https://d3ehv1nix5p99z.cloudfront.net/pr-cms-807/docs/user-guide/quickstart/overview/ Updated at: 2026-05-07T14:58:31.189Z |
|
Assessment: Request Changes The code example is now correct and follows the recommended Small change, almost there! 👍 |
gautamsirdeshmukh
left a comment
There was a problem hiding this comment.
Hi there, happy to shepherd this along if you are able to take care of the remaining callout!
|
Assessment: Approve All previous feedback has been addressed. The code example now correctly uses the Thanks for iterating on this — the Ollama docs will now guide users to the correct, non-deprecated approach. |
Description
When executing the example provided in the below documentation page:
https://strandsagents.com/docs/user-guide/concepts/model-providers/ollama/#structured-output
A deprecation warning is displayed as below:
Related Issues
Type of Change
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.