invoke method

  1. @override
Future<LLMResult> invoke(
  1. PromptValue input, {
  2. Options? options,
})
override

Invokes the Runnable on the given input.

  • input - the input to invoke the Runnable on.
  • options - the options to use when invoking the Runnable.

Implementation

@override
Future<LLMResult> invoke(
  final PromptValue input, {
  final Options? options,
}) async {
  final output = await callInternal(input.toString(), options: options);
  return LLMResult(
    id: '1',
    output: output,
    finishReason: FinishReason.unspecified,
    metadata: const {},
    usage: const LanguageModelUsage(),
  );
}