Closed austinmw closed 3 months ago
Thanks for reaching out. The converse command makes a call to the underlying Bedrock Converse API, so this issue involves the API rather than Boto3 directly. This may just be a limitation with the Bedrock/Claude results being non-deterministic. I recommend reaching out to the Bedrock team internally for further information on this, along with the request to update the documentation and/or add a Converse example here: https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html#conversation-inference-examples. We could also track the general request to add more Bedrock examples here: https://github.com/boto/boto3/discussions/4222
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Describe the bug
I've defined the following nested tool spec:
However the output often (depending on variability in the run) skips some required parameters. For example this output is missing several
duration
fields:Is there anything wrong with the
toolSpec
I've provided, is this a bug, or does the model/API just not support nested parameters?Expected Behavior
Expecting every required parameter to be included
Current Behavior
Some required parameters are skipped
Reproduction Steps
See code
Possible Solution
Add documentation around how this works. I think many people might (wrongly?) assume that when using a
toolSpec
, outputs will be verified to ensure they exactly match a provided spec. Having missing parameters in the output is very surprising.Note that I can get this to output all parameters more reliably by improving the descriptions. I'm more concerned about the lack of clarity or documentation here. One would expect indeterministic results for the
values
of the output that are filled in, but not in thekeys
as well!Additional Information/Context
For context, I'm trying to define a toolSpec to match this Pydantic
WorkoutPlan
model:I have code that takes as input
tools = [WorkoutPlan]
and outputs theformatted_tools
list I provided.SDK version used
Latest
Environment details (OS name and version, etc.)
MacOS