Class WatsonxGatewayModelCatalog
java.lang.Object
dev.langchain4j.model.watsonx.WatsonxGatewayModelCatalog
- All Implemented Interfaces:
ModelCatalog
A
ModelCatalog implementation that lists the models configured in the IBM watsonx.ai Model Gateway.
Example usage:
ModelCatalog modelCatalog = WatsonxGatewayModelCatalog.builder()
.baseUrl("https://...") // or use CloudRegion
.apiKey("...")
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructingWatsonxGatewayModelCataloginstances with configurable parameters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a newWatsonxGatewayModelCatalog.Builderinstance.Retrieves a list of available models from the provider.provider()Returns the provider for this catalog service.
-
Constructor Details
-
WatsonxGatewayModelCatalog
-
-
Method Details
-
listModels
Description copied from interface:ModelCatalogRetrieves a list of available models from the provider.- Specified by:
listModelsin interfaceModelCatalog- Returns:
- A list of model descriptions
-
provider
Description copied from interface:ModelCatalogReturns the provider for this catalog service.- Specified by:
providerin interfaceModelCatalog- Returns:
- The model provider
-
builder
Returns a newWatsonxGatewayModelCatalog.Builderinstance.Example usage:
ModelCatalog modelCatalog = WatsonxGatewayModelCatalog.builder() .baseUrl("https://...") // or use CloudRegion .apiKey("...") .build();- Returns:
WatsonxGatewayModelCatalog.Builderinstance.
-