HTTP client abstraction for LangChain4j with synchronous/asynchronous execution and Server-Sent Events (SSE) streaming support
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-http-client</artifactId>
<version>1.11.0</version>
</dependency>implementation 'dev.langchain4j:langchain4j-http-client:1.11.0'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;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