updated the string to watsonx

This commit is contained in:
Sajikumar JS 2025-04-25 11:03:21 +05:30
parent 6fe8b292b1
commit 2f498ad776
7 changed files with 16 additions and 16 deletions

View file

@ -119,7 +119,7 @@ Here is a list of the various API providers and available distributions that can
| OpenAI | Hosted | | ✅ | | | | | OpenAI | Hosted | | ✅ | | | |
| Anthropic | Hosted | | ✅ | | | | | Anthropic | Hosted | | ✅ | | | |
| Gemini | Hosted | | ✅ | | | | | Gemini | Hosted | | ✅ | | | |
| WatsonX | Hosted | | ✅ | | | | | watsonx | Hosted | | ✅ | | | |
### Distributions ### Distributions

View file

@ -2,7 +2,7 @@
orphan: true orphan: true
--- ---
<!-- This file was auto-generated by distro_codegen.py, please edit source --> <!-- This file was auto-generated by distro_codegen.py, please edit source -->
# WatsonX Distribution # watsonx Distribution
```{toctree} ```{toctree}
:maxdepth: 2 :maxdepth: 2
@ -32,8 +32,8 @@ The `llamastack/distribution-watsonx` distribution consists of the following pro
The following environment variables can be configured: The following environment variables can be configured:
- `LLAMASTACK_PORT`: Port for the Llama Stack distribution server (default: `5001`) - `LLAMASTACK_PORT`: Port for the Llama Stack distribution server (default: `5001`)
- `WATSONX_API_KEY`: Watsonx API Key (default: ``) - `WATSONX_API_KEY`: watsonx API Key (default: ``)
- `WATSONX_PROJECT_ID`: Watsonx Project ID (default: ``) - `WATSONX_PROJECT_ID`: watsonx Project ID (default: ``)
### Models ### Models
@ -52,10 +52,10 @@ The following models are available by default:
### Prerequisite: API Keys ### Prerequisite: API Keys
Make sure you have access to a WatsonX API Key. You can get one by referring [watsonx.ai](https://www.ibm.com/docs/en/masv-and-l/maximo-manage/continuous-delivery?topic=setup-create-watsonx-api-key). Make sure you have access to a watsonx API Key. You can get one by referring [watsonx.ai](https://www.ibm.com/docs/en/masv-and-l/maximo-manage/continuous-delivery?topic=setup-create-watsonx-api-key).
## Running Llama Stack with WatsonX ## Running Llama Stack with watsonx
You can do this via Conda (build code), venv or Docker which has a pre-built image. You can do this via Conda (build code), venv or Docker which has a pre-built image.

View file

@ -22,11 +22,11 @@ class WatsonXProviderDataValidator(BaseModel):
class WatsonXConfig(BaseModel): class WatsonXConfig(BaseModel):
url: str = Field( url: str = Field(
default_factory=lambda: os.getenv("WATSONX_BASE_URL", "https://us-south.ml.cloud.ibm.com"), default_factory=lambda: os.getenv("WATSONX_BASE_URL", "https://us-south.ml.cloud.ibm.com"),
description="A base url for accessing the Watsonx.ai", description="A base url for accessing the watsonx.ai",
) )
api_key: Optional[SecretStr] = Field( api_key: Optional[SecretStr] = Field(
default_factory=lambda: os.getenv("WATSONX_API_KEY"), default_factory=lambda: os.getenv("WATSONX_API_KEY"),
description="The Watsonx API key, only needed of using the hosted service", description="The watsonx API key, only needed of using the hosted service",
) )
project_id: Optional[str] = Field( project_id: Optional[str] = Field(
default_factory=lambda: os.getenv("WATSONX_PROJECT_ID"), default_factory=lambda: os.getenv("WATSONX_PROJECT_ID"),

View file

@ -50,7 +50,7 @@ class WatsonXInferenceAdapter(Inference, ModelRegistryHelper):
def __init__(self, config: WatsonXConfig) -> None: def __init__(self, config: WatsonXConfig) -> None:
ModelRegistryHelper.__init__(self, MODEL_ENTRIES) ModelRegistryHelper.__init__(self, MODEL_ENTRIES)
print(f"Initializing WatsonXInferenceAdapter({config.url})...") print(f"Initializing watsonx InferenceAdapter({config.url})...")
self._config = config self._config = config

View file

@ -1,6 +1,6 @@
version: '2' version: '2'
distribution_spec: distribution_spec:
description: Use WatsonX for running LLM inference description: Use watsonx for running LLM inference
providers: providers:
inference: inference:
- remote::watsonx - remote::watsonx

View file

@ -1,7 +1,7 @@
--- ---
orphan: true orphan: true
--- ---
# WatsonX Distribution # watsonx Distribution
```{toctree} ```{toctree}
:maxdepth: 2 :maxdepth: 2
@ -38,10 +38,10 @@ The following models are available by default:
### Prerequisite: API Keys ### Prerequisite: API Keys
Make sure you have access to a WatsonX API Key. You can get one by referring [watsonx.ai](https://www.ibm.com/docs/en/masv-and-l/maximo-manage/continuous-delivery?topic=setup-create-watsonx-api-key). Make sure you have access to a watsonx API Key. You can get one by referring [watsonx.ai](https://www.ibm.com/docs/en/masv-and-l/maximo-manage/continuous-delivery?topic=setup-create-watsonx-api-key).
## Running Llama Stack with WatsonX ## Running Llama Stack with watsonx
You can do this via Conda (build code), venv or Docker which has a pre-built image. You can do this via Conda (build code), venv or Docker which has a pre-built image.

View file

@ -59,7 +59,7 @@ def get_distribution_template() -> DistributionTemplate:
return DistributionTemplate( return DistributionTemplate(
name="watsonx", name="watsonx",
distro_type="remote_hosted", distro_type="remote_hosted",
description="Use WatsonX for running LLM inference", description="Use watsonx for running LLM inference",
container_image=None, container_image=None,
template_path=Path(__file__).parent / "doc_template.md", template_path=Path(__file__).parent / "doc_template.md",
providers=providers, providers=providers,
@ -80,11 +80,11 @@ def get_distribution_template() -> DistributionTemplate:
), ),
"WATSONX_API_KEY": ( "WATSONX_API_KEY": (
"", "",
"Watsonx API Key", "watsonx API Key",
), ),
"WATSONX_PROJECT_ID": ( "WATSONX_PROJECT_ID": (
"", "",
"Watsonx Project ID", "watsonx Project ID",
), ),
}, },
) )