Class WatsonxChatModel

java.lang.Object
dev.langchain4j.model.watsonx.WatsonxChatModel
All Implemented Interfaces:
ChatModel

public class WatsonxChatModel extends Object implements ChatModel
A ChatModel implementation that integrates IBM watsonx.ai with LangChain4j.

Example usage:

ChatModel chatModel = WatsonxChatModel.builder()
    .url("https://...") // or use CloudRegion
    .apiKey("...")
    .projectId("...")
    .modelName("ibm/granite-3-8b-instruct")
    .maxOutputTokens(0)
    .temperature(0.7)
    .build();