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[minor]: Add stack exchange tool #5162

Merged
merged 13 commits into from
May 6, 2024

Conversation

tolares
Copy link
Contributor

@tolares tolares commented Apr 20, 2024

This change add the tools StackExchange as in the Python version of LangChain

  • Created Return types for StackExchange API
  • Created Tests similar to the Python ones

Twitter: @dev_lagarde

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 20, 2024
Copy link

vercel bot commented Apr 20, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2024 5:58pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview May 6, 2024 5:58pm

@dosubot dosubot bot added the auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features label Apr 20, 2024
@@ -0,0 +1,180 @@
import * as querystring from 'querystring';
Copy link

Choose a reason for hiding this comment

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

Hey team, I've flagged this PR for your review as it introduces a new fetch request in the _makeRequest method. This is a net-new, non-api client external HTTP request, and I wanted to bring it to your attention for further review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Their is no official Stack Exchange NPM package that wrap the API so I used the fetch directly

@jacoblee93
Copy link
Collaborator

Thanks for the PR!

Could you add a docs page?

@jacoblee93 jacoblee93 changed the title Add stack exchange tool community[minor]: Add stack exchange tool Apr 22, 2024
@jacoblee93 jacoblee93 added the close PRs that need one or two touch-ups to be ready label Apr 22, 2024
@tolares
Copy link
Contributor Author

tolares commented Apr 22, 2024

Thanks for the PR!

Could you add a docs page?

I have added some documentation in the corresponding folder and solve the different feedbacks

@tolares
Copy link
Contributor Author

tolares commented Apr 26, 2024

@jacoblee93 Do you need any additional information in order to merge this PR ?

Copy link
Collaborator

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

couple nits, besides that it lgtm! thanks for handling this.

Will merge tmro when I cut a release. Thank you!

libs/langchain-community/src/tools/stackexchange.ts Outdated Show resolved Hide resolved
libs/langchain-community/src/tools/stackexchange.ts Outdated Show resolved Hide resolved
@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label May 1, 2024
@bracesproul
Copy link
Collaborator

Hmm, looks like formatting is failing. Could you run yarn format and push the changes? Thanks

@tolares
Copy link
Contributor Author

tolares commented May 1, 2024

Thank you for spotting the format issue @bracesproul . I have fixed them and apply your proposal to have some cleaner jsdoc

@tolares
Copy link
Contributor Author

tolares commented May 3, 2024

Sorry I think my last commit didn't include the fix will push it asap

Copy link
Collaborator

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

Ah woops, you need to add this new module to libs/langchain-community/langchain.config.js see docs here

Copy link
Collaborator

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

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

Pushed a commit running yarn build

This is required after you add a new entrypoint b/c it adds it to the package.json and updates the gitignore to not commit build artifacts

@tolares
Copy link
Contributor Author

tolares commented May 6, 2024

Pushed a commit running yarn build

This is required after you add a new entrypoint b/c it adds it to the package.json and updates the gitignore to not commit build artifacts

Thanks though I shouldn’t add the file in the PR ! Will try to make my next PR smoother and thank you for your time on it

@bracesproul bracesproul merged commit d6fcb44 into langchain-ai:main May 6, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features close PRs that need one or two touch-ups to be ready lgtm PRs that are ready to be merged as-is size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants