Skip to content

thingsboard/langchain4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,589 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LangChain4j — ThingsBoard Fork

This is a fork of LangChain4j maintained by ThingsBoard.

Published under the org.thingsboard.langchain4j group ID.

Conventions

Commit messages

All ThingsBoard-specific commits must use the [TB] prefix in the commit message (e.g., [TB] feat: add caching support).

Versioning

Versions follow the {upstream_version}-TB{N} scheme, where {upstream_version} is the base LangChain4j release and {N} is an incrementing number for each TB-specific release on top of it (e.g., 1.11.0-TB1, 1.11.0-TB2, 1.11.0-TB3). The counter starts at 1 and resets to 1 when upgrading to a new upstream version.

Changes compared to upstream

Gemini caching support

  • Full integration with the Google Gemini cached content API — reuse large contexts across requests to save cost and latency (a13c8fb).
  • Checksum-based deduplication to avoid re-caching identical content (cd48ffb).
  • Caching of systemInstruction alongside user content (ab27f35).
  • Handling of cached content duplicates (55486d9).
  • TTL extension via PATCH instead of delete+recreate (2982dfc).

Gemini enhancements

  • Send original content parts back to the model when continuing a conversation (df6179c).
  • Accumulate original content parts across streaming chunks instead of overwriting with last chunk's data (f30e554).

AiServices framework extensions

  • Custom metadata support for AiServices and Result (token counts, model info, etc.) (aa3063d).
  • Per-request ResponseFormat via @Format annotation — each AiService method can specify its own response format (d6953f5).
  • Deferred async tool execution in streaming — tools are submitted to the executor after intermediateResponseHandler fires, ensuring intermediate text is delivered before tool execution events (95b9b3d).
  • Pre-built UserMessage arguments — an AiServices method may pass a fully constructed UserMessage (recognized via @UserMessage on the parameter, or as the sole un-annotated argument) and have it used verbatim, preserving its contents and attributes, instead of assembling one from a template (85ce410).

Build & distribution

  • Maven group ID changed to org.thingsboard.langchain4j (d18c050).
  • Distribution management configured for ThingsBoard's Maven repository (4075ddf, ae6de7e, 615a46d).
  • Upstream GitHub workflows removed (TB uses its own CI) (b79d357).
  • Revapi API-compatibility checks disabled fork-wide via the revapi.skip property in langchain4j-parent/pom.xml (we intentionally diverge from upstream's published API).
  • Source JAR publishing disabled fork-wide via the maven.source.skip property in langchain4j-parent/pom.xml (the fork's sources are not published with the artifacts).

About

Java version of LangChain

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 99.4%
  • Other 0.6%