Class WatsonxGatewayChatModel

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

public class WatsonxGatewayChatModel extends Object implements ChatModel
A ChatModel implementation that integrates the IBM watsonx.ai Model Gateway with LangChain4j.

Example usage:

ChatModel chatModel = WatsonxGatewayChatModel.builder()
    .baseUrl("https://...") // or use CloudRegion
    .apiKey("...")
    .modelName("gpt-4o")
    .maxOutputTokens(0)
    .temperature(0.7)
    .build();
  • Field Details

    • modelGatewayService

      protected final com.ibm.watsonx.ai.gateway.chat.ModelGatewayService modelGatewayService
    • listeners

      protected final List<ChatModelListener> listeners
    • defaultRequestParameters

      protected final ChatRequestParameters defaultRequestParameters
    • supportedCapabilities

      protected final Set<Capability> supportedCapabilities
    • strictJsonSchema

      protected final boolean strictJsonSchema
  • Method Details