invoke method
Invokes the Runnable
on the given input
.
input
- the input to invoke theRunnable
on.options
- the options to use when invoking theRunnable
.
Implementation
@override
Future<ChatResult> invoke(
final PromptValue input, {
final ChatOllamaOptions? options,
}) async {
final id = _uuid.v4();
final completion = await _client.generateChatCompletion(
request: generateChatCompletionRequest(
input.toChatMessages(),
options: options,
defaultOptions: defaultOptions,
),
);
return completion.toChatResult(id);
}