 self.model_config_dict = model_config_dict
        self.project_id = os.getenv("WATSONX_PROJECT_ID")
        self.base_url = os.getenv("WATSONX_URL")
        self.api_key = os.getenv("WATSONX_APIKEY")</p>
<pre><code>    if not self.project_id or not self.base_url or not self.api_key:
        raise RuntimeError("Watsonx environment variables are not properly set.")

    # Initialize the WatsonxLLM client
    self.client = WatsonxLLM(
        model_id=self.model_type.value,
        url=self.base_url,
       