Skip to content

Bump langchain to 1.3#161

Merged
jGauravGupta merged 8 commits into
jeddict:mainfrom
stefanofornari:ste.langchain_1.3
Aug 23, 2025
Merged

Bump langchain to 1.3#161
jGauravGupta merged 8 commits into
jeddict:mainfrom
stefanofornari:ste.langchain_1.3

Conversation

@stefanofornari

Copy link
Copy Markdown
Collaborator

Upgraded LangChain4j dependencies in pom.xml to version 1.3.0 (or 1.3.0-beta9 for local-ai) and added langchain4j-http-client-jdk. Although the effort to adapt the current codebase to langchain 1.3 was quite minimal, I think it is needed as langchain has done major architectural changes in 1.x and having the latest version is a much more solid basis for further improvements.

This upgrade required significant refactoring to adapt to the new LangChain4j API, including:

  • Migrating from ChatLanguageModel to ChatModel and StreamingChatLanguageModel to StreamingChatModel.
  • Updating chat generation methods from generate to chat.
  • Adjusting JeddictStreamHandler to use StreamingChatResponseHandler and its new methods
    (onPartialResponse, onCompleteResponse).
  • Modifying error handling for chat model responses.
  • Refactoring maxRetries handling in chat model builders.
  • Updating LMStudioChatModel to align with the new ChatModel interface.

PLEASE NOTE: LMStudioChatModel required some more work, which I am still not able to test because LMStudio is not really working on my PC. I'll be happy to improve or do more changes as reqquired.

….0-beta9 for local-ai) and added

  langchain4j-http-client-jdk.

  This upgrade required significant refactoring to adapt to the new LangChain4j API, including:
   - Migrating from ChatLanguageModel to ChatModel and StreamingChatLanguageModel to StreamingChatModel.
   - Updating chat generation methods from generate to chat.
   - Adjusting JeddictStreamHandler to use StreamingChatResponseHandler and its new methods
     (onPartialResponse, onCompleteResponse).
   - Modifying error handling for chat model responses.
   - Refactoring maxRetries handling in chat model builders.
@jGauravGupta jGauravGupta added this to the 3.3 milestone Aug 22, 2025
Comment thread src/main/java/io/github/jeddict/ai/lang/JeddictStreamHandler.java
@jGauravGupta jGauravGupta merged commit 0b68e14 into jeddict:main Aug 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants