Class WatsonxModelCatalog
java.lang.Object
dev.langchain4j.model.watsonx.WatsonxModelCatalog
- All Implemented Interfaces:
ModelCatalog
A
ModelCatalog implementation that integrates IBM watsonx.ai with LangChain4j.
Example usage:
ModelCatalog modelCatalog = WatsonxModelCatalog.builder()
.baseUrl("https://...") // or use CloudRegion
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructingWatsonxModelCataloginstances with configurable parameters. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WatsonxModelCatalog.Builderbuilder()Returns a newWatsonxModelCatalog.Builderinstance.Retrieves a list of available models from the provider.provider()Returns the provider for this catalog service.
-
Constructor Details
-
WatsonxModelCatalog
-
-
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 newWatsonxModelCatalog.Builderinstance.Example usage:
ModelCatalog modelCatalog = WatsonxModelCatalog.builder() .baseUrl("https://...") // or use CloudRegion .build();- Returns:
WatsonxModelCatalog.Builderinstance.
-