TemplateGenerativeModel class final
A generative model that connects to a remote server template.
- Available extensions
- Annotations
-
- @experimental
Properties
Methods
-
generateContent(
String templateId, {required Map< String, Object?> inputs, TemplateToolConfig? toolConfig}) → Future<GenerateContentResponse> -
Generates content from a template with the given
templateIdandinputs. -
generateContentStream(
String templateId, {required Map< String, Object?> inputs, TemplateToolConfig? toolConfig}) → Stream<GenerateContentResponse> -
Generates a stream of content responding to
templateIdandinputs. -
makeRequest<
T> (Task task, Map< String, Object?> params, T parse(Map<String, Object?> )) → Future<T> -
Make a unary request for
taskwith JSON encodableparams.inherited -
makeTemplateRequest<
T> (TemplateTask task, String templateId, Map< String, Object?> ? inputs, Iterable<Content> ? history, List<TemplateTool> ? tools, TemplateToolConfig? toolConfig, T parse(Map<String, Object?> )) → Future<T> -
Makes a unary request to a template-based API.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startChat(
String templateId, {required Map< String, Object?> inputs, List<Content> ? history, List<TemplateTool> ? tools, TemplateToolConfig? toolConfig, int? maxTurns}) → TemplateChatSession -
Available on TemplateGenerativeModel, provided by the StartTemplateChatExtension extension
Starts a TemplateChatSession that will use this model to respond to messages. -
streamTemplateRequest<
T> (TemplateTask task, String templateId, Map< String, Object?> ? inputs, Iterable<Content> ? history, List<TemplateTool> ? tools, TemplateToolConfig? toolConfig, T parse(Map<String, Object?> )) → Stream<T> -
Makes a streaming request to a template-based API.
inherited
-
taskUri(
Task task) → Uri -
Returns a URI for the given
task.inherited -
templateGenerateContentWithHistory(
Iterable< Content> history, String templateId, {required Map<String, Object?> inputs, List<TemplateTool> ? tools, TemplateToolConfig? toolConfig}) → Future<GenerateContentResponse> -
Generates content from a template with the given
templateId,inputsandhistory. -
templateGenerateContentWithHistoryStream(
Iterable< Content> history, String templateId, {required Map<String, Object?> inputs, List<TemplateTool> ? tools, TemplateToolConfig? toolConfig}) → Stream<GenerateContentResponse> -
Generates a stream of content from a template with the given
templateId,inputsandhistory. -
templateName(
String templateId) → String -
Returns the template name for the given
templateId.inherited -
templateTaskUri(
TemplateTask task, String templateId) → Uri -
Returns the URI for the given
taskandtemplateId.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited