Skip to content

bug fix: tools with examples in docstrings#162

Open
eliasposen wants to merge 2 commits intosierra-research:mainfrom
eliasposen:main
Open

bug fix: tools with examples in docstrings#162
eliasposen wants to merge 2 commits intosierra-research:mainfrom
eliasposen:main

Conversation

@eliasposen
Copy link

This PR fixes a small bug when a tool docstring included an example section.

Bug:

  • Tool.parse_data would return {"examples": List[DocstringExample]}
  • Pydantic would then fail to construct Tool because examples are listed as List[str]

Fix:

  • Format DocstringExample into str
  • Add test

Signed-off-by: Elias Posen <elias@posen.ch>
Signed-off-by: Elias Posen <elias@posen.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant