diff --git a/tests/utils/llmFactory.ts b/tests/utils/llmFactory.ts index 4b207b64..db2ac573 100644 --- a/tests/utils/llmFactory.ts +++ b/tests/utils/llmFactory.ts @@ -25,8 +25,10 @@ export function createChatLLM(): ChatLLM { return BAMChatLLM.fromPreset("meta-llama/llama-3-1-70b-instruct"); } else if (process.env.OPENAI_API_KEY) { return new OpenAIChatLLM({ modelId: "gpt-4o" }); - } else if (process.env.WATSONX_API_KEY) { - return WatsonXChatLLM.fromPreset("meta-llama/llama-3-70b-instruct"); + } else if (process.env.WATSONX_API_KEY && process.env.WATSONX_PROJECT_ID) { + return WatsonXChatLLM.fromPreset("meta-llama/llama-3-70b-instruct", { + projectId: process.env.WATSONX_PROJECT_ID, + }); } else { throw new Error("No API key for any LLM provider has been provided. Cannot run test case."); }