generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 423
Closed
Labels
area-structured-outputRelated to the structured output apiRelated to the structured output apibugSomething isn't workingSomething isn't working
Description
Checks
- I have updated to the lastest minor and patch version of Strands
- I have checked the documentation and this is not expected behavior
- I have searched ./issues and there are no duplicates of my issue
Strands Version
1.4.0
Python Version
3.12
Operating System
MacOS
Installation Method
git clone
Steps to Reproduce
from typing import List
from pydantic import BaseModel, Field
from strands import tool, Agent
class ExampleFailure(BaseModel):
ages: List[str] = Field(default_factory = list)
names: List[str] = Field(default_factory = list)
agent = Agent(system_prompt="You excel at structured output")
agent.structured_output(AntiPatternOutput, "Name=Joe, age=88")
Expected Behavior
It works
Actual Behavior
Error message:
File structured_output.py:80, in _flatten_schema(schema)
78 flattened["required"] = required_props
79 else:
---> 80 raise ValueError("Circular reference detected and not supported")
82 return flattened
ValueError: Circular reference detected and not supported
Additional Context
No response
Possible Solution
No response
Related Issues
No response
sromoam, mattverantos, mimocha and liorkesten
Metadata
Metadata
Assignees
Labels
area-structured-outputRelated to the structured output apiRelated to the structured output apibugSomething isn't workingSomething isn't working