The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
added support for different types in ResponseSchema class (#5789)
SvMax92b87c2fec17
diff --git a/langchain/output_parsers/structured.py b/langchain/output_parsers/structured.pyindex 9afaf6cdac..a7b5c3910d 100644--- a/langchain/output_parsers/structured.py+++ b/langchain/output_parsers/structured.py@@ -14,11 +14,12 @@ line_template = '\t"{name}": {type} // {description}'class ResponseSchema(BaseModel):name: strdescription: str+ type: str = "string"def _get_sub_string(schema: ResponseSchema) -> str:return line_template.format(- name=schema.name, description=schema.description, type="string"+ name=schema.name, description=schema.description, type=schema.type)