mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-19 19:11:33 +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",
|
apiKeyName: "TOGETHER_API_KEY",
|
||||||
packageName: "langchain[together]",
|
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",
|
value: "databricks",
|
||||||
label: "Databricks",
|
label: "Databricks",
|
||||||
|
@ -27,6 +27,8 @@ export default function EmbeddingTabs(props) {
|
|||||||
hideNvidia,
|
hideNvidia,
|
||||||
voyageaiParams,
|
voyageaiParams,
|
||||||
hideVoyageai,
|
hideVoyageai,
|
||||||
|
ibmParams,
|
||||||
|
hideIBM,
|
||||||
fakeEmbeddingParams,
|
fakeEmbeddingParams,
|
||||||
hideFakeEmbedding,
|
hideFakeEmbedding,
|
||||||
customVarName,
|
customVarName,
|
||||||
@ -45,6 +47,8 @@ export default function EmbeddingTabs(props) {
|
|||||||
const nomicsParamsOrDefault = nomicParams ?? `model="nomic-embed-text-v1.5"`;
|
const nomicsParamsOrDefault = nomicParams ?? `model="nomic-embed-text-v1.5"`;
|
||||||
const nvidiaParamsOrDefault = nvidiaParams ?? `model="NV-Embed-QA"`;
|
const nvidiaParamsOrDefault = nvidiaParams ?? `model="NV-Embed-QA"`;
|
||||||
const voyageaiParamsOrDefault = voyageaiParams ?? `model="voyage-3"`;
|
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 fakeEmbeddingParamsOrDefault = fakeEmbeddingParams ?? `size=4096`;
|
||||||
|
|
||||||
const embeddingVarName = customVarName ?? "embeddings";
|
const embeddingVarName = customVarName ?? "embeddings";
|
||||||
@ -149,6 +153,15 @@ export default function EmbeddingTabs(props) {
|
|||||||
default: false,
|
default: false,
|
||||||
shouldHide: hideVoyageai,
|
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",
|
value: "Fake",
|
||||||
label: "Fake",
|
label: "Fake",
|
||||||
|
Loading…
Reference in New Issue
Block a user