Coloured output:
specifies the agent's name in capital letters in pink and the response text in blue.
Structured output fix:
Fix the function name
Updating function description when Pydantic class has no docstring
Here is the prompt we're sending with the current implementation:
Pydantic class WITH doc string:
{'function_call': 'auto',
'functions': [{'name': 'Schema', 'description': 'This class defines the output format of our agent',
'parameters': {'properties': {'name': {'type': 'string'}, 'agent': {'type': 'integer'}, 'is_student': {'type': 'boolean'}, 'courses': {'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['name', 'agent', 'is_student', 'courses'], 'type': 'object'}}]}
Pydantic class WITHOUT doc string:
{'function_call': 'auto',
'functions': [{'name': 'Schema', 'description': "Strictly adhere to Schema's format with all the required parameters using the correct types",
'parameters': {'properties': {'name': {'type': 'string'}, 'agent': {'type': 'integer'}, 'is_student': {'type': 'boolean'}, 'courses': {'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['name', 'agent', 'is_student', 'courses'], 'type': 'object'}}]}
Description:
Coloured output: specifies the agent's name in capital letters in pink and the response text in blue.
Structured output fix:
Here is the prompt we're sending with the current implementation: Pydantic class WITH doc string: {'function_call': 'auto', 'functions': [{'name': 'Schema', 'description': 'This class defines the output format of our agent', 'parameters': {'properties': {'name': {'type': 'string'}, 'agent': {'type': 'integer'}, 'is_student': {'type': 'boolean'}, 'courses': {'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['name', 'agent', 'is_student', 'courses'], 'type': 'object'}}]}
Pydantic class WITHOUT doc string: {'function_call': 'auto', 'functions': [{'name': 'Schema', 'description': "Strictly adhere to
Schema
's format with all the required parameters using the correct types", 'parameters': {'properties': {'name': {'type': 'string'}, 'agent': {'type': 'integer'}, 'is_student': {'type': 'boolean'}, 'courses': {'items': {'type': 'string'}, 'type': 'array'}}, 'required': ['name', 'agent', 'is_student', 'courses'], 'type': 'object'}}]}Test agent_with_basemodel_output_type.py
Tag maintainer: @kyegomez
📚 Documentation preview 📚: https://swarms--543.org.readthedocs.build/en/543/