Skip to content

Conversation

@jbkoh
Copy link
Contributor

@jbkoh jbkoh commented Jul 5, 2023

  • Description: pydantic's ModelField.type_ only exposes the native data type but not complex type hints like List. Thus, generating a Tool with from_function through function signature produces incorrect argument schemas (e.g., str instead of List[str])
  • Issue: N/A
  • Dependencies: N/A
  • Tag maintainer: @hinthornw
  • Twitter handle: mapped

All the unittest (with an additional one in this PR) passed, though I didn't try integration tests...

@vercel
Copy link

vercel bot commented Jul 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Jul 6, 2023 6:33pm

@dosubot dosubot bot added the bug Related to a bug, vulnerability, unexpected error with an existing feature label Jul 5, 2023
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@hwchase17 hwchase17 added the lgtm label Jul 6, 2023
@jbkoh
Copy link
Contributor Author

jbkoh commented Jul 6, 2023

@hwchase17 I had to format the code. Please rerun the workflow if needed. Thanks!

@baskaryan baskaryan merged commit d642609 into langchain-ai:master Jul 6, 2023
@jbkoh jbkoh deleted the fix-tool-from-functions-pydantic branch January 18, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Related to a bug, vulnerability, unexpected error with an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants