Gemini自定义输出格式方法:JSON/表格/流程图导出 2026-06-04阅读 0热度 0 Gemini = model.generate_content( prompt="从以下简历中提取姓名、电话、邮箱、工作年限,并以JSON格式返回", generation_config={ "response_mime_type": "application/json", "response_schema": {"type": "object", "properties": {"name": {"type": "string"}, "phone": {"type": "string"}, "email": {"type": "string"}, "years": {"type": "integer"}}} } )