|
|
@ -123,11 +123,6 @@ class _ExampleState extends State<Example> {
|
|
|
|
model: 'gemini-pro',
|
|
|
|
model: 'gemini-pro',
|
|
|
|
apiKey: widget.apiKey,
|
|
|
|
apiKey: widget.apiKey,
|
|
|
|
requestOptions: const RequestOptions(apiVersion: 'v1beta'),
|
|
|
|
requestOptions: const RequestOptions(apiVersion: 'v1beta'),
|
|
|
|
|
|
|
|
|
|
|
|
// systemInstruction: Content.text(
|
|
|
|
|
|
|
|
// 'You are a task bot that can complete, add, '
|
|
|
|
|
|
|
|
// 'and filter tasks for a todo style application.',
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
tools: [
|
|
|
|
tools: [
|
|
|
|
Tool(
|
|
|
|
Tool(
|
|
|
|
functionDeclarations: <FunctionDeclaration>[
|
|
|
|
functionDeclarations: <FunctionDeclaration>[
|
|
|
@ -384,9 +379,10 @@ class _ExampleState extends State<Example> {
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
controller: controller,
|
|
|
|
decoration: textFieldDecoration(
|
|
|
|
decoration: textFieldDecoration(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
'Try "Add a task for..." or "What are my ucompleted '
|
|
|
|
'Try "Add a task for..."'
|
|
|
|
'tasks?"'),
|
|
|
|
'or "What are my uncompleted tasks?"',
|
|
|
|
|
|
|
|
),
|
|
|
|
onEditingComplete: sendMessage,
|
|
|
|
onEditingComplete: sendMessage,
|
|
|
|
onSubmitted: (value) => sendMessage(),
|
|
|
|
onSubmitted: (value) => sendMessage(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|