You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You are a helpful assistant. Today's date is {}. When scheduling meetings, use appropriate dates relative to today.",
171
-
current_date
172
-
);
173
-
174
170
let request = GenerateContentRequest{
175
171
system_instruction:Some(Content{
176
-
parts:vec![ContentPart::Text(system_message)],
172
+
parts:vec![ContentPart{
173
+
data:ContentData::Text(system_message),
174
+
thought:false,
175
+
metadata:None,
176
+
}],
177
177
role:Role::User,
178
178
}),
179
179
contents:vec![Content{
180
-
parts: vec![ContentPart::Text(
181
-
"Please schedule a team meeting for tomorrow at 2 PM with John, Sarah, and Mike to discuss the quarterly review. tag it as work, it's a P5, and make it public".to_string(),
182
-
)],
180
+
parts: vec![ContentPart{
181
+
data:ContentData::Text("Please schedule a team meeting for tomorrow at 2 PM with John, Sarah, and Mike to discuss the quarterly review. tag it as work, it's a P5, and make it public".to_string()),
182
+
metadata:None,
183
+
thought:false
184
+
}],
183
185
role:Role::User,
184
186
}],
185
-
tools:Some(vec![tool_config]),
187
+
tools:vec![
188
+
Tool::FunctionDeclaration(
189
+
ToolConfigFunctionDeclaration{
190
+
function_declarations: vec![
191
+
function_declaration.clone()
192
+
]
193
+
}
194
+
),
195
+
],
196
+
tool_config:None,
186
197
generation_config:None,
187
198
};
188
199
189
-
// Serialize the function declaration to JSON for verification
190
-
let serialized_function = serde_json::to_value(&function_declaration)?;
0 commit comments