CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-dev-langchain4j--langchain4j-http-client

HTTP client abstraction for LangChain4j with synchronous/asynchronous execution and Server-Sent Events (SSE) streaming support

Overview
Eval results
Files

installation.mddocs/

Installation

Maven

<dependency>
  <groupId>dev.langchain4j</groupId>
  <artifactId>langchain4j-http-client</artifactId>
  <version>1.11.0</version>
</dependency>

Gradle

implementation 'dev.langchain4j:langchain4j-http-client:1.11.0'

Core Imports

import dev.langchain4j.http.client.HttpClient;
import dev.langchain4j.http.client.HttpClientBuilder;
import dev.langchain4j.http.client.HttpClientBuilderLoader;
import dev.langchain4j.http.client.HttpRequest;
import dev.langchain4j.http.client.HttpMethod;
import dev.langchain4j.http.client.SuccessfulHttpResponse;

Service Provider Interface (SPI)

The library uses Java's ServiceLoader pattern. At least one HTTP client implementation must be on the classpath (e.g., langchain4j-http-client-java-net or langchain4j-http-client-okhttp).

Multiple Implementations: Use system property langchain4j.http.clientBuilderFactory to select which implementation to use:

java -Dlangchain4j.http.clientBuilderFactory=com.example.MyHttpClientFactory ...

Install with Tessl CLI

npx tessl i tessl/maven-dev-langchain4j--langchain4j-http-client

docs

index.md

installation.md

quick-start.md

tile.json