invoke method

  1. @override
Future<LLMResult> invoke(
  1. PromptValue input, {
  2. LLMOptions? 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 LLMOptions? options,
}) {
  return Future<LLMResult>.value(
    LLMResult(
      id: 'fake-echo',
      output: input.toString(),
      finishReason: FinishReason.stop,
      metadata: const {},
      usage: const LanguageModelUsage(),
    ),
  );
}