Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: added args_schema to YahooFinanceNewsTool #21232

Merged
merged 3 commits into from
May 6, 2024

Conversation

pvl
Copy link
Contributor

@pvl pvl commented May 2, 2024

Description: this change adds args_schema (pydantic BaseModel) to YahooFinanceNewsTool for correct schema formatting on LLM function calls

Issue: currently using YahooFinanceNewsTool with OpenAI function calling returns the following error "TypeError("YahooFinanceNewsTool._run() got an unexpected keyword argument '__arg1'")". This happens because the schema sent to the LLM is "input: "{'__arg1': 'MSFT'}"" while the method should be called with the "query" parameter.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label May 2, 2024
Copy link

vercel bot commented May 2, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview May 3, 2024 0:35am

@dosubot dosubot bot added the 🤖:improvement Medium size change to existing code to handle new use-cases label May 2, 2024
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label May 6, 2024
@hwchase17 hwchase17 merged commit bebf46c into langchain-ai:master May 6, 2024
60 checks passed
dglogo pushed a commit to dglogo/langchain that referenced this pull request May 8, 2024
)

Description: this change adds args_schema (pydantic BaseModel) to
YahooFinanceNewsTool for correct schema formatting on LLM function calls

Issue: currently using YahooFinanceNewsTool with OpenAI function calling
returns the following error "TypeError("YahooFinanceNewsTool._run() got
an unexpected keyword argument '__arg1'")". This happens because the
schema sent to the LLM is "input: "{'__arg1': 'MSFT'}"" while the method
should be called with the "query" parameter.

Co-authored-by: Bagatur <[email protected]>
kyle-cassidy pushed a commit to kyle-cassidy/langchain that referenced this pull request May 10, 2024
)

Description: this change adds args_schema (pydantic BaseModel) to
YahooFinanceNewsTool for correct schema formatting on LLM function calls

Issue: currently using YahooFinanceNewsTool with OpenAI function calling
returns the following error "TypeError("YahooFinanceNewsTool._run() got
an unexpected keyword argument '__arg1'")". This happens because the
schema sent to the LLM is "input: "{'__arg1': 'MSFT'}"" while the method
should be called with the "query" parameter.

Co-authored-by: Bagatur <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases lgtm PR looks good. Use to confirm that a PR is ready for merging. size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants