@Override
	public ChatResponse call(Prompt prompt) {

		WatsonxAiRequest request = request(prompt);

		WatsonxAiResponse response = this.watsonxAiApi.generate(request).getBody();
		var generator = new Generation(response.results().get(0).generatedText());

		generator = generator.withGenerationMetadata(
				ChatGenerationMetadata.from(response.results().get(0).stopReason(), response.system()));

		return new ChatResponse(List.of(generator));
	}
@Test
	public void testCallMethod() {
		WatsonxAiApi mockChatApi = mock(WatsonxAiApi.class);
		WatsonxAiChatModel chatModel = new WatsonxAiChatModel(mockChatApi);

		Prompt prompt = new Prompt(List.of(new SystemMessage("Your prompt here")),
				WatsonxAiChatOptions.builder().withModel("google/flan-ul2").build());

		WatsonxAiChatOptions parameters = WatsonxAiChatOptions.builder().withModel("google/flan-ul2").build();

		WatsonxAiResults fakeResults = new WatsonxAiResults("LLM response", 4, 3, "max_tokens");

		WatsonxAiResponse fakeResponse = new WatsonxAiResponse("google/flan-ul2", new Date(), List.of(fakeResults),
				Map.of("warnings", List.of(Map.of("message", "the message", "id", "disclaimer_warning"))));

		when(mockChatApi.generate(any(WatsonxAiRequest.class)))
			.thenReturn(ResponseEntity.of(Optional.of(fakeResponse)));

		Generation expectedGenerator = new Generation("LLM response")
			.withGenerationMetadata(ChatGenerationMetadata.from("max_tokens",
					Map.of("warnings", List.of(Map.of("message", "the message", "id", "disclaimer_warning")))));

		ChatResponse expectedResponse = new ChatResponse(List.of(expectedGenerator));
		ChatResponse response = chatModel.call(prompt);

		Assert.assertEquals(expectedResponse.getResults().size(), response.getResults().size());
		Assert.assertEquals(expectedResponse.getResult().getOutput(), response.getResult().getOutput());
	}