langchain-ibmUsage documentation Refer to the docs for a high-level guide on how to use each module. These reference pages contain auto-generated API documentation for each module, focusing on the "what" rather than the "how" or "why" (i.e. no end-to-end tutorials or conceptual overviews).
ChatWatsonxIBM watsonx.ai chat models.
WatsonxLLM(Legacy) IBM watsonx.ai text completion models.
WatsonxEmbeddingsIBM watsonx.ai embedding models.
WatsonxRerankIBM watsonx.ai document retriever.
WatsonxToolkitIBM watsonx.ai toolkit.
WatsonxSQLDatabaseToolkitIBM watsonx.ai SQL database toolkit.
IBM watsonx.ai embedding model integration.
To use, you should have langchain_ibm python package installed,
and the environment variable WATSONX_API_KEY set with your
IBM watsonx.ai large language models class.
To use the large language models, you need to have the langchain_ibm python
package installed, and the environment variable
IBM watsonx.ai chat models integration.
To use, you should have langchain_ibm python package installed,
and the environment variable WATSONX_API_KEY set with your API
Document compressor that uses watsonx Rerank API.
To use, you should have langchain_ibm python package installed,
and the environment variable WATSONX_API_KEY set wit
Watsonx SQL Database class for IBM watsonx.ai databases connection assets.
Uses Arrow Flight to interact with databases via watsonx.
IBM watsonx.ai Tool.
IBM watsonx.ai Toolkit.
To use, you should have langchain_ibm python package installed,
and the environment variable WATSONX_API_KEY set with your API key, or pass
Toolkit for interacting with IBM watsonx.ai databases.
Base tool for interacting with a SQL database.
Tool for querying a SQL database.
Tool for getting metadata about a SQL database.
Tool for getting tables names.
Use an LLM to check if a query is correct.
Check for attribute.
Extract params.
Extract chat params.
Check duplicate chat params.
Decorator to catch ApiRequestFailure on Model Gateway calls.
Logs a uniform warning when the model is not properly registered.
Async decorator to catch ApiRequestFailure on Model Gateway calls.
Log a uniform warning when the Model Gateway is misused.
Resolve watsonx credentials.
Return default factory that yields a SecretStr from the first non-empty env var.
The factory:
names_priority).Normalize deprecated 'apikey' to 'api_key'.
Ensure arguments is always a proper JSON string with robust error handling.
Handles various malformed inputs from LLMs including:
Validate that scope (project_id or space_id) is provided when using model_id.
Truncate a string to a maximum length.
Based on the analogous function from langchain_common.utilities.sql_database.py.
Pretty print table info.
Fetch metadata for a single table.
Convert WatsonxTool to watsonx tool structure.