Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lfx/src/lfx/_assets/component_index.json

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions src/lfx/src/lfx/base/models/unified_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,18 @@ def validate_model_provider_key(variable_name: str, api_key: str) -> None:
llm = ChatGoogleGenerativeAI(google_api_key=api_key, model=first_model, max_tokens=1)
llm.invoke("test")
elif provider == "IBM WatsonX":
# WatsonX validation would require additional parameters
# Skip for now as it needs project_id, url, etc.
return
from langchain_ibm import ChatWatsonx

default_url = "https://us-south.ml.cloud.ibm.com"
llm = ChatWatsonx(
apikey=api_key,
url=default_url,
model_id=first_model,
project_id="dummy_project_for_validation", # Dummy project_id for validation
params={"max_new_tokens": 1},
)
llm.invoke("test")

elif provider == "Ollama":
# Ollama is local, just verify the URL is accessible
import requests
Expand Down
8 changes: 6 additions & 2 deletions src/lfx/src/lfx/base/models/watsonx_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
name="ibm/granite-3-2b-instruct",
icon="WatsonxAI",
model_type="llm",
tool_calling=False,
tool_calling=True,
default=True,
),
create_model_metadata(
Expand All @@ -22,7 +22,7 @@
name="ibm/granite-13b-instruct-v2",
icon="WatsonxAI",
model_type="llm",
tool_calling=False,
tool_calling=True,
default=True,
),
]
Expand All @@ -33,27 +33,31 @@
name="sentence-transformers/all-minilm-l12-v2",
icon="WatsonxAI",
model_type="embeddings",
tool_calling=True,
default=True,
),
create_model_metadata(
provider="IBM WatsonX",
name="ibm/slate-125m-english-rtrvr-v2",
icon="WatsonxAI",
model_type="embeddings",
tool_calling=True,
default=True,
),
create_model_metadata(
provider="IBM WatsonX",
name="ibm/slate-30m-english-rtrvr-v2",
icon="WatsonxAI",
model_type="embeddings",
tool_calling=True,
default=True,
),
create_model_metadata(
provider="IBM WatsonX",
name="intfloat/multilingual-e5-large",
icon="WatsonxAI",
model_type="embeddings",
tool_calling=True,
default=True,
),
]
Expand Down
Loading