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

docs[minor]: Replace deprecated code examples with LCEL & AgentExecutor #6149

Merged
merged 4 commits into from
Jul 19, 2024

Conversation

Srijan-D
Copy link
Contributor

@Srijan-D Srijan-D commented Jul 19, 2024

Description: Added LangChain v0.2 support For the LangChain AgentExecutor using react agent executor which manages a state that is defined by a list of messages in a similar way to the AgentExecutor. Removed classes as well like LLMChain which were deprecated from LangChain v0.1.

Used the LangChain Expression Language (LCEL) instead of LLMChain deprecated class

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 19, 2024
Copy link

vercel bot commented Jul 19, 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 Jul 19, 2024 4:49pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview Jul 19, 2024 4:49pm

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Jul 19, 2024
@@ -17,36 +17,29 @@ export const run = async () => {
}),
Copy link

Choose a reason for hiding this comment

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

Hey there! I noticed that this PR introduces a new external HTTP request to pull the prompt template. I've flagged this change for your review to ensure it aligns with our project's requirements. Let me know if you have any questions or need further clarification!

@@ -1,14 +1,14 @@
import { LLMChain } from "langchain/chains";
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 a change in the PR that accesses an environment variable using process.env. Please review this to ensure it aligns with our security and configuration best practices.

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.

nice! Thanks for doing this

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label Jul 19, 2024
@bracesproul bracesproul changed the title Removed deprecated classes. Adding v0.2 langchainjs support replaced ZeroShotAgent with createReactAgent docs[minor]: Replace deprecated code examples with LCEL & AgentExecutor Jul 19, 2024
@bracesproul bracesproul removed the lgtm PRs that are ready to be merged as-is label Jul 19, 2024
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.

hey looks like the format CI check is failing, could you run yarn format inside ./examples and push up those changes files

@Srijan-D
Copy link
Contributor Author

Srijan-D commented Jul 19, 2024 via email

@Srijan-D
Copy link
Contributor Author

Done I have pushed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants