mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-25 08:03:39 +00:00
docs: Added IBM to ChatModelTabs and EmbeddingTabs (#29774)
Thank you for contributing to LangChain! Added IBM to ChatModelTabs and EmbeddingTabs - [x] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/
This commit is contained in:
parent
76d32754ff
commit
61f1be2152
@ -191,6 +191,19 @@ ${llmVarName} = AzureChatOpenAI(
|
||||
apiKeyName: "TOGETHER_API_KEY",
|
||||
packageName: "langchain[together]",
|
||||
},
|
||||
{
|
||||
value: "ibm",
|
||||
label: "IBM",
|
||||
text: `from langchain_ibm import ChatWatsonx
|
||||
|
||||
${llmVarName} = ChatWatsonx(
|
||||
model_id="ibm/granite-34b-code-instruct",
|
||||
url="https://us-south.ml.cloud.ibm.com",
|
||||
project_id="<WATSONX PROJECT_ID>"
|
||||
)`,
|
||||
apiKeyName: "WATSONX_APIKEY",
|
||||
packageName: "langchain-ibm",
|
||||
},
|
||||
{
|
||||
value: "databricks",
|
||||
label: "Databricks",
|
||||
|
@ -27,6 +27,8 @@ export default function EmbeddingTabs(props) {
|
||||
hideNvidia,
|
||||
voyageaiParams,
|
||||
hideVoyageai,
|
||||
ibmParams,
|
||||
hideIBM,
|
||||
fakeEmbeddingParams,
|
||||
hideFakeEmbedding,
|
||||
customVarName,
|
||||
@ -45,6 +47,8 @@ export default function EmbeddingTabs(props) {
|
||||
const nomicsParamsOrDefault = nomicParams ?? `model="nomic-embed-text-v1.5"`;
|
||||
const nvidiaParamsOrDefault = nvidiaParams ?? `model="NV-Embed-QA"`;
|
||||
const voyageaiParamsOrDefault = voyageaiParams ?? `model="voyage-3"`;
|
||||
const ibmParamsOrDefault = ibmParams ??
|
||||
`\n model_id="ibm/slate-125m-english-rtrvr,\n url="https://us-south.ml.cloud.ibm.com",\n project_id="<WATSONX PROJECT_ID>",\n`;
|
||||
const fakeEmbeddingParamsOrDefault = fakeEmbeddingParams ?? `size=4096`;
|
||||
|
||||
const embeddingVarName = customVarName ?? "embeddings";
|
||||
@ -149,6 +153,15 @@ export default function EmbeddingTabs(props) {
|
||||
default: false,
|
||||
shouldHide: hideVoyageai,
|
||||
},
|
||||
{
|
||||
value: "IBM",
|
||||
label: "IBM",
|
||||
text: `from langchain_ibm import WatsonxEmbeddings\n\n${embeddingVarName} = WatsonxEmbeddings(${ibmParamsOrDefault})`,
|
||||
apiKeyName: "WATSONX_APIKEY",
|
||||
packageName: "langchain-ibm",
|
||||
default: false,
|
||||
shouldHide: hideIBM,
|
||||
},
|
||||
{
|
||||
value: "Fake",
|
||||
label: "Fake",
|
||||
|
Loading…
Reference in New Issue
Block a user