docs: updated readmefile to support latest langchain version#364
Open
vkpatva wants to merge 1 commit intohashgraph:mainfrom
Open
docs: updated readmefile to support latest langchain version#364vkpatva wants to merge 1 commit intohashgraph:mainfrom
vkpatva wants to merge 1 commit intohashgraph:mainfrom
Conversation
- Replace createToolCallingAgent with createOpenAIToolsAgent for OpenAI - Add conditional logic to support both OpenAI and other providers - Update ChatOpenAI initialization to use modelName and openAIApiKey - Remove chat_history placeholder to match working demo structure - Add verbose: true to AgentExecutor - Support both ACCOUNT_ID/PRIVATE_KEY and HEDERA_ACCOUNT_ID/HEDERA_PRIVATE_KEY env vars - Update example code to match current LangChain API patterns Signed-off-by: vkpatva <vkpatva.it@gmail.com>
rbarker-dev
approved these changes
Nov 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This PR updates the README.md quick-start example to use the current LangChain v1.0.1+ API in order to ensure the documentation matches working code implementations and provides accurate examples for new users.
The previous example used deprecated LangChain patterns that no longer work with current versions. This update aligns the documentation with the actual working implementation and maintains backward compatibility with multiple AI providers.
createToolCallingAgentwithcreateOpenAIToolsAgentfor OpenAI modelscreateOpenAIToolsAgentfor OpenAI andcreateToolCallingAgentfor other providers (Claude, Groq, Ollama)ChatOpenAIinitialization to explicitly usemodelNameandopenAIApiKeyparameterschat_historyplaceholder from prompt template to match current working demo structureverbose: truetoAgentExecutorfor better debugging outputACCOUNT_ID/PRIVATE_KEYandHEDERA_ACCOUNT_ID/HEDERA_PRIVATE_KEYenvironment variable naming conventionsawaitkeyword for agent creation (required in LangChain v1.0.1+)Notes for reviewer:
The changes have been tested against a working implementation and verified to match the current LangChain API. The example code:
createOpenAIToolsAgentcreateToolCallingAgentChecklist