invoke method
Invokes the Runnable on the given input
.
Implementation
@override
Future<ChatResult> invoke(
final PromptValue input, {
final Options? options,
}) async {
final text = await callInternal(input.toChatMessages(), options: options);
final message = AIChatMessage(content: text);
return ChatResult(
id: '1',
output: message,
finishReason: FinishReason.unspecified,
metadata: const {},
usage: const LanguageModelUsage(),
);
}