{"id":6427,"date":"2025-05-16T14:28:04","date_gmt":"2025-05-16T14:28:04","guid":{"rendered":"https:\/\/www.myshirtai.com\/archives\/6427"},"modified":"2025-05-16T14:28:04","modified_gmt":"2025-05-16T14:28:04","slug":"gemini-2-0-pdf%e8%a7%a3%e6%9e%90%e5%85%a8%e6%94%bb%e7%95%a5%ef%bc%9a%e4%bb%a3%e7%a0%81%e5%ae%9e%e4%be%8b%e4%b8%8e%e6%9c%80%e4%bd%b3%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/www.myshirtai.com\/pt\/archives\/6427","title":{"rendered":"Gemini 2.0 PDF Explained: Exemplos de c\u00f3digo e melhores pr\u00e1ticas"},"content":{"rendered":"\n<p>PDF\u6587\u6863\u4f5c\u4e3a\u4f01\u4e1a\u548c\u4e2a\u4eba\u4fe1\u606f\u5b58\u50a8\u7684\u91cd\u8981\u8f7d\u4f53\uff0c\u4e00\u76f4\u4ee5\u6765\u90fd\u662f\u6570\u636e\u5904\u7406\u9886\u57df\u7684\u4e00\u5927\u6311\u6218\u3002\u968f\u7740Google DeepMind\u63a8\u51fa\u7684Gemini 2.0\u6a21\u578b\uff0c\u8fd9\u4e00\u9886\u57df\u6b63\u8fce\u6765\u524d\u6240\u672a\u6709\u7684\u53d8\u9769\u3002\u672c\u6587\u5c06\u63a2\u8ba8Gemini 2.0\u5982\u4f55\u5f7b\u5e95\u6539\u53d8PDF\u5904\u7406\u7684\u683c\u5c40\uff0c\u5e76\u901a\u8fc7\u5b9e\u9645\u4ee3\u7801\u793a\u4f8b\u5c55\u793a\u5982\u4f55\u5229\u7528\u8fd9\u4e00\u6280\u672f\u5904\u7406\u5404\u7c7bPDF\u6587\u6863\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-pdf\u5904\u7406\u7684\u4f20\u7edf\u6311\u6218\">PDF\u5904\u7406\u7684\u4f20\u7edf\u6311\u6218<\/h2>\n\n\n\n<p>\u957f\u671f\u4ee5\u6765\uff0c\u5c06PDF\u6587\u6863\u8f6c\u6362\u4e3a\u673a\u5668\u53ef\u8bfb\u7684\u7ed3\u6784\u5316\u6570\u636e\u4e00\u76f4\u662fAI\u548c\u6570\u636e\u5904\u7406\u9886\u57df\u7684&#8221;\u8001\u5927\u96be&#8221;\u95ee\u9898\u3002\u4f20\u7edf\u89e3\u51b3\u65b9\u6848\u5927\u81f4\u53ef\u5206\u4e3a\u4e09\u7c7b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u5f00\u6e90\u7aef\u5230\u7aef\u6a21\u578b<\/strong>\uff1a\u5728\u9762\u5bf9\u590d\u6742\u7248\u9762\u6392\u5e03\u65f6\u5e38\u5e38\u529b\u4e0d\u4ece\u5fc3\uff0c\u96be\u4ee5\u51c6\u786e\u8bc6\u522b\u8868\u683c\u3001\u56fe\u5f62\u548c\u7279\u6b8a\u6392\u7248\u3002<\/li>\n\n\n\n<li><strong>\u591a\u6a21\u578b\u7ec4\u5408\u65b9\u6848<\/strong>\uff1a\u5982NVIDIA\u7684nv-ingest\u9700\u8981\u5728Kubernetes\u4e0a\u90e8\u7f728\u4e2a\u670d\u52a1\u548c\u591a\u4e2aGPU\uff0c\u4e0d\u4ec5\u90e8\u7f72\u590d\u6742\uff0c\u800c\u4e14\u8c03\u5ea6\u6210\u672c\u9ad8\u6602\u3002<\/li>\n\n\n\n<li><strong>\u5546\u4e1a\u4ed8\u8d39\u670d\u52a1<\/strong>\uff1a\u867d\u7136\u63d0\u4f9b\u4e86\u4e00\u5b9a\u7684\u4fbf\u5229\u6027\uff0c\u4f46\u5728\u5904\u7406\u590d\u6742\u5e03\u5c40\u65f6\u51c6\u786e\u7387\u4e0d\u7a33\u5b9a\uff0c\u4e14\u5927\u89c4\u6a21\u5e94\u7528\u65f6\u6210\u672c\u5448\u6307\u6570\u7ea7\u589e\u957f\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u8fd9\u4e9b\u65b9\u6848\u5728\u51c6\u786e\u6027\u3001\u53ef\u6269\u5c55\u6027\u548c\u6210\u672c\u6548\u76ca\u4e09\u65b9\u9762\u5f88\u96be\u627e\u5230\u5e73\u8861\u70b9\uff0c\u5c24\u5176\u5f53\u9762\u5bf9\u9700\u8981\u5904\u7406\u4e0a\u4ebf\u9875\u6587\u6863\u7684\u573a\u666f\u65f6\uff0c\u6210\u672c\u5f80\u5f80\u4ee4\u4eba\u671b\u800c\u5374\u6b65\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/school.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg\" alt=\"\" class=\"wp-image-1269\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-\u914d\u7f6e\u73af\u5883\u4e0e\u8bbe\u7f6egemini-2-0\">\u914d\u7f6e\u73af\u5883\u4e0e\u8bbe\u7f6eGemini 2.0<\/h2>\n\n\n\n<p>\u8981\u5f00\u59cb\u4f7f\u7528Gemini 2.0\u5904\u7406PDF\u6587\u6863\uff0c\u9996\u5148\u9700\u8981\u8bbe\u7f6e\u73af\u5883\u5e76\u521b\u5efa\u63a8\u7406\u5ba2\u6237\u7aef\u3002\u4e0b\u9762\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u5b89\u88c5\u5fc5\u8981\u7684\u5e93\">\u5b89\u88c5\u5fc5\u8981\u7684\u5e93<\/h3>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">%pip install \"google-genai&gt;=1\"\n<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u521b\u5efa\u5ba2\u6237\u7aef\u4e0e\u6a21\u578b\u914d\u7f6e\">\u521b\u5efa\u5ba2\u6237\u7aef\u4e0e\u6a21\u578b\u914d\u7f6e<\/h3>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">from google import genai\n\n# \u521b\u5efa\u5ba2\u6237\u7aef\napi_key = \"YOUR_API_KEY\"  # \u8bf7\u66ff\u6362\u4e3a\u4f60\u7684API\u5bc6\u94a5\nclient = genai.Client(api_key=api_key)\n\n# \u5b9a\u4e49\u8981\u4f7f\u7528\u7684\u6a21\u578b\nmodel_id = \"gemini-2.0-flash\"  # \u4e5f\u53ef\u4ee5\u4f7f\u7528 \"gemini-2.0-flash-lite-preview-02-05\" \u6216 \"gemini-2.0-pro-exp-02-05\"\n<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u4e0a\u4f20\u548c\u5904\u7406pdf\u6587\u4ef6\">\u4e0a\u4f20\u548c\u5904\u7406PDF\u6587\u4ef6<\/h3>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\"># \u4e0a\u4f20PDF\u6587\u4ef6\ninvoice_pdf = client.files.upload(file=\"invoice.pdf\", config={'display_name': 'invoice'})\n\n# \u67e5\u770b\u6587\u4ef6\u8f6c\u6362\u4e3a\u591a\u5c11\u4e2a\u4ee4\u724c\nfile_size = client.models.count_tokens(model=model_id, contents=invoice_pdf)\nprint(f'File: {invoice_pdf.display_name} equals to {file_size.total_tokens} tokens')\n\n# \u8f93\u51fa\u793a\u4f8b: File: invoice equals to 821 tokens\n<\/code><\/pre><\/div>\n\n\n\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u6211\u4eec\u5df2\u7ecf\u5b8c\u6210\u4e86\u57fa\u7840\u73af\u5883\u914d\u7f6e\uff0c\u5e76\u6210\u529f\u4e0a\u4f20\u4e86\u7b2c\u4e00\u4e2aPDF\u6587\u4ef6\u7528\u4e8e\u5904\u7406\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0cGemini\u6587\u4ef6API\u5141\u8bb8\u6bcf\u4e2a\u9879\u76ee\u6700\u591a\u5b58\u50a820GB\u7684\u6587\u4ef6\uff0c\u6bcf\u4e2a\u6587\u4ef6\u6700\u5927\u4e3a2GB\uff0c\u4e0a\u4f20\u7684\u6587\u4ef6\u4f1a\u4fdd\u5b5848\u5c0f\u65f6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-\u7ed3\u6784\u5316pdf\u6570\u636e\u63d0\u53d6\u5b9e\u6218\">\u7ed3\u6784\u5316PDF\u6570\u636e\u63d0\u53d6\u5b9e\u6218<\/h2>\n\n\n\n<p>Gemini 2.0\u7684\u4e00\u4e2a\u5f3a\u5927\u529f\u80fd\u662f\u80fd\u591f\u4ecePDF\u6587\u4ef6\u4e2d\u63d0\u53d6\u7ed3\u6784\u5316\u6570\u636e\u3002\u4e0b\u9762\u6211\u4eec\u5c06\u901a\u8fc7\u5b9e\u9645\u6848\u4f8b\u5c55\u793a\u5982\u4f55\u5229\u7528Pydantic\u6a21\u578b\u914d\u5408Gemini\u5b9e\u73b0\u8fd9\u4e00\u529f\u80fd\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u5b9a\u4e49\u901a\u7528\u6570\u636e\u63d0\u53d6\u65b9\u6cd5\">\u5b9a\u4e49\u901a\u7528\u6570\u636e\u63d0\u53d6\u65b9\u6cd5<\/h3>\n\n\n\n<p>\u9996\u5148\uff0c\u6211\u4eec\u5b9a\u4e49\u4e00\u4e2a\u901a\u7528\u7684\u65b9\u6cd5\u6765\u5904\u7406PDF\u6587\u4ef6\u5e76\u8fd4\u56de\u7ed3\u6784\u5316\u6570\u636e\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">def extract_structured_data(file_path: str, model: BaseModel):\n    # \u4e0a\u4f20\u6587\u4ef6\u5230\u6587\u4ef6API\n    file = client.files.upload(file=file_path, config={'display_name': file_path.split('\/')[-1].split('.')[0]})\n    \n    # \u4f7f\u7528Gemini API\u751f\u6210\u7ed3\u6784\u5316\u54cd\u5e94\n    prompt = f\"Extract the structured data from the following PDF file\"\n    response = client.models.generate_content(model=model_id, \n                                             contents=[prompt, file], \n                                             config={'response_mime_type': 'application\/json', \n                                                     'response_schema': model})\n    \n    # \u5c06\u54cd\u5e94\u8f6c\u6362\u4e3aPydantic\u6a21\u578b\u5e76\u8fd4\u56de\n    return response.parsed\n<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u6848\u4f8b1-\u53d1\u7968\u6570\u636e\u63d0\u53d6\">\u6848\u4f8b1\uff1a\u53d1\u7968\u6570\u636e\u63d0\u53d6<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u53d1\u7968\u7c7bPDF\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u4ee5\u4e0b\u6a21\u578b\u6765\u63d0\u53d6\u5173\u952e\u4fe1\u606f\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">from pydantic import BaseModel, Field\n\nclass Item(BaseModel):\n    description: str = Field(description=\"The description of the item\")\n    quantity: float = Field(description=\"The Qty of the item\")\n    gross_worth: float = Field(description=\"The gross worth of the item\")\n\nclass Invoice(BaseModel):\n    \"\"\"Extract the invoice number, date and all list items with description, quantity and gross worth and the total gross worth.\"\"\"\n    invoice_number: str = Field(description=\"The invoice number e.g. 1234567890\")\n    date: str = Field(description=\"The date of the invoice e.g. 2024-01-01\")\n    items: list[Item] = Field(description=\"The list of items with description, quantity and gross worth\")\n    total_gross_worth: float = Field(description=\"The total gross worth of the invoice\")\n\n# \u4f7f\u7528\u8be5\u6a21\u578b\u63d0\u53d6\u6570\u636e\nresult = extract_structured_data(\"invoice.pdf\", Invoice)\n\n# \u8f93\u51fa\u7ed3\u679c\nprint(f\"Extracted Invoice: {result.invoice_number} on {result.date} with total gross worth {result.total_gross_worth}\")\nfor item in result.items:\n    print(f\"Item: {item.description} with quantity {item.quantity} and gross worth {item.gross_worth}\")\n<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/school.myshirtai.com\/wp-content\/uploads\/2025\/05\/image-54.png\" alt=\"\" class=\"wp-image-1271\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u6848\u4f8b2-\u542b\u624b\u5199\u5185\u5bb9\u7684\u8868\u5355\u5904\u7406\">\u6848\u4f8b2\uff1a\u542b\u624b\u5199\u5185\u5bb9\u7684\u8868\u5355\u5904\u7406<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u5305\u542b\u624b\u5199\u5185\u5bb9\u7684\u8868\u5355\uff0c\u6211\u4eec\u540c\u6837\u53ef\u4ee5\u5b9a\u4e49\u4e13\u7528\u7684\u6a21\u578b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">class Form(BaseModel):\n    \"\"\"Extract the form number, fiscal start date, fiscal end date, and the plan liabilities beginning of the year and end of the year.\"\"\"\n    form_number: str = Field(description=\"The Form Number\")\n    start_date: str = Field(description=\"Effective Date\")\n    beginning_of_year: float = Field(description=\"The plan liabilities beginning of the year\")\n    end_of_year: float = Field(description=\"The plan liabilities end of the year\")\n\n# \u63d0\u53d6\u6570\u636e\nresult = extract_structured_data(\"handwriting_form.pdf\", Form)\n\n# \u8f93\u51fa\u7ed3\u679c\nprint(f'Extracted Form Number: {result.form_number} with start date {result.start_date}.\\nPlan liabilities beginning of the year {result.beginning_of_year} and end of the year {result.end_of_year}')\n# \u8f93\u51fa\u793a\u4f8b: Extracted Form Number: CA530082 with start date 02\/05\/2022.\n# Plan liabilities beginning of the year 40000.0 and end of the year 55000.0\n<\/code><\/pre><\/div>\n\n\n\n<p>\u901a\u8fc7\u4e0a\u8ff0\u793a\u4f8b\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230Gemini 2.0\u80fd\u591f\u51c6\u786e\u8bc6\u522bPDF\u4e2d\u7684\u6587\u672c\u5185\u5bb9\uff0c\u751a\u81f3\u5305\u62ec\u624b\u5199\u6587\u5b57\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u7684JSON\u6570\u636e\u683c\u5f0f\uff0c\u6781\u5927\u5730\u7b80\u5316\u4e86\u6570\u636e\u63d0\u53d6\u6d41\u7a0b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-\u9ad8\u7ea7\u5e94\u7528-\u6587\u6863\u5206\u5757\u4e0e\u8bed\u4e49\u7406\u89e3\">\u9ad8\u7ea7\u5e94\u7528\uff1a\u6587\u6863\u5206\u5757\u4e0e\u8bed\u4e49\u7406\u89e3<\/h2>\n\n\n\n<p>\u5728RAG\uff08\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff09\u7cfb\u7edf\u4e2d\uff0c\u9664\u4e86\u57fa\u672c\u7684\u6587\u672c\u63d0\u53d6\u5916\uff0c\u6587\u6863\u5206\u5757\uff08Chunking\uff09\u4e5f\u662f\u5173\u952e\u6b65\u9aa4\u3002Gemini 2.0\u5141\u8bb8\u6211\u4eec\u5728\u4e00\u4e2a\u6b65\u9aa4\u4e2d\u5b8c\u6210OCR\u548c\u8bed\u4e49\u5206\u5757\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-pdf\u8bed\u4e49\u5206\u5757\u793a\u4f8b\">PDF\u8bed\u4e49\u5206\u5757\u793a\u4f8b<\/h3>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5c06PDF\u8f6c\u6362\u4e3aMarkdown\u5e76\u540c\u65f6\u8fdb\u884c\u8bed\u4e49\u5206\u5757\u7684\u63d0\u793a\u8bcd\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">CHUNKING_PROMPT = \"\"\"OCR the following page into Markdown. Tables should be formatted as HTML. \nDo not surround your output with triple backticks.\nChunk the document into sections of roughly 250 - 1000 words. Our goal is \nto identify parts of the page with same semantic theme. These chunks will \nbe embedded and used in a RAG pipeline. \nSurround the chunks with &lt;chunk&gt; &lt;\/chunk&gt; html tags.\"\"\"\n\n# \u4f7f\u7528\u8be5\u63d0\u793a\u8bcd\u8fdb\u884c\u5904\u7406\nresponse = client.models.generate_content(\n    model=model_id,\n    contents=[CHUNKING_PROMPT, pdf_file],\n)\n\nchunked_content = response.text\n<\/code><\/pre><\/div>\n\n\n\n<p>\u8fd9\u79cd\u65b9\u6cd5\u80fd\u591f\u8bc6\u522b\u6587\u6863\u7684\u8bed\u4e49\u8fb9\u754c\uff0c\u751f\u6210\u66f4\u6709\u610f\u4e49\u7684\u6587\u672c\u5757\uff0c\u6781\u5927\u5730\u63d0\u5347\u540e\u7eed\u68c0\u7d22\u7684\u51c6\u786e\u6027\u3002\u4e0e\u4f20\u7edf\u7684\u57fa\u4e8e\u5b57\u7b26\u6570\u7684\u673a\u68b0\u5206\u5757\u76f8\u6bd4\uff0c\u8bed\u4e49\u5206\u5757\u66f4\u80fd\u4fdd\u6301\u5185\u5bb9\u7684\u8fde\u8d2f\u6027\u548c\u5b8c\u6574\u6027\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u4f7f\u7528pydantic\u8fdb\u884c\u590d\u6742\u6570\u636e\u63d0\u53d6\">\u4f7f\u7528Pydantic\u8fdb\u884c\u590d\u6742\u6570\u636e\u63d0\u53d6<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u573a\u666f\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u5d4c\u5957\u7684Pydantic\u6a21\u578b\u6765\u5904\u7406\u591a\u5c42\u6b21\u7684\u6570\u636e\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">class Person(BaseModel):\n    first_name: str = Field(description=\"The first name of the person\")\n    last_name: str = Field(description=\"The last name of the person\")\n    age: int = Field(description=\"The age of the person, if not provided please return 0\")\n    work_topics: list[Topic] = Field(description=\"The fields of interest of the person, if not provided please return an empty list\")\n\n# \u4f7f\u7528Person\u6a21\u578b\u751f\u6210\u54cd\u5e94\nprompt = \"Philipp Schmid is a Senior AI Developer Relations Engineer at Google DeepMind working on Gemini, Gemma with the mission to help every developer to build and benefit from AI in a responsible way.\"\nresponse = client.models.generate_content(\n    model=model_id, \n    contents=prompt, \n    config={'response_mime_type': 'application\/json', 'response_schema': Person}\n)\n\n# SDK\u4f1a\u81ea\u52a8\u5c06\u54cd\u5e94\u8f6c\u6362\u4e3aPydantic\u6a21\u578b\nphilipp: Person = response.parsed\nprint(f\"First name is {philipp.first_name}\")\n<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-\u6027\u80fd\u4f18\u5316\u4e0e\u6700\u4f73\u5b9e\u8df5\">\u6027\u80fd\u4f18\u5316\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h2>\n\n\n\n<p>\u5728\u5927\u89c4\u6a21\u5904\u7406PDF\u6587\u6863\u65f6\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u63d0\u5347\u6548\u7387\u548c\u51c6\u786e\u5ea6\u7684\u6700\u4f73\u5b9e\u8df5\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u6279\u91cf\u5904\u7406\u4e0e\u4ee4\u724c\u4f18\u5316\">\u6279\u91cf\u5904\u7406\u4e0e\u4ee4\u724c\u4f18\u5316<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u9700\u8981\u5904\u7406\u5927\u91cfPDF\u7684\u573a\u666f\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6279\u91cf\u5904\u7406\u6765\u63d0\u9ad8\u6548\u7387\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">async def batch_process_pdfs(file_paths, model, batch_size=10):\n    results = []\n    for i in range(0, len(file_paths), batch_size):\n        batch = file_paths[i:i+batch_size]\n        tasks = [extract_structured_data(path, model) for path in batch]\n        batch_results = await asyncio.gather(*tasks)\n        results.extend(batch_results)\n        print(f\"Processed batch {i\/\/batch_size + 1}\/{(len(file_paths)+batch_size-1)\/\/batch_size}\")\n    return results\n<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u6a21\u578b\u9009\u62e9\u4e0e\u6210\u672c\u63a7\u5236\">\u6a21\u578b\u9009\u62e9\u4e0e\u6210\u672c\u63a7\u5236<\/h3>\n\n\n\n<p>\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u6a21\u578b\u53d8\u4f53\u53ef\u4ee5\u5927\u5e45\u964d\u4f4e\u6210\u672c\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Gemini 2.0 Flash<\/strong>: \u901a\u7528\u573a\u666f\u7684\u6700\u4f73\u9009\u62e9\uff0c\u6027\u4ef7\u6bd4\u6781\u9ad8<\/li>\n\n\n\n<li><strong>Gemini 2.0 Flash-Lite<\/strong>: \u5bf9\u4e8e\u7b80\u5355\u6587\u6863\uff0c\u63d0\u4f9b\u66f4\u9ad8\u7684\u6027\u4ef7\u6bd4<\/li>\n\n\n\n<li><strong>Gemini 2.0 Pro<\/strong>: \u5904\u7406\u6781\u5176\u590d\u6742\u7684\u6587\u6863\u6216\u9700\u8981\u9ad8\u7cbe\u5ea6\u7684\u573a\u666f<\/li>\n<\/ol>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u5bf9\u4e0d\u540c\u6a21\u578b\u7684\u5904\u7406\u6548\u7387\u6bd4\u8f83\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u6a21\u578b<\/strong><\/th><th><strong>\u6bcf\u7f8e\u5143\u53ef\u5904\u7406\u7684PDF\u9875\u6570(Markdown\u8f6c\u6362)<\/strong><\/th><\/tr><\/thead><tbody><tr><td>Gemini 2.0 Flash<\/td><td>\u7ea66,000\u9875<\/td><\/tr><tr><td>Gemini 2.0 Flash Lite<\/td><td>\u7ea612,000\u9875<\/td><\/tr><tr><td>Gemini 1.5 Flash<\/td><td>\u7ea610,000\u9875<\/td><\/tr><tr><td>OpenAI 4o-mini<\/td><td>\u7ea6450\u9875<\/td><\/tr><tr><td>OpenAI 4o<\/td><td>\u7ea6200\u9875<\/td><\/tr><tr><td>Anthropic Claude-3.5<\/td><td>\u7ea6100\u9875<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u9519\u8bef\u5904\u7406\u4e0e\u91cd\u8bd5\u673a\u5236\">\u9519\u8bef\u5904\u7406\u4e0e\u91cd\u8bd5\u673a\u5236<\/h3>\n\n\n\n<p>\u5728\u751f\u4ea7\u73af\u5883\u4e2d\uff0c\u5b9e\u73b0\u7a33\u5065\u7684\u9519\u8bef\u5904\u7406\u673a\u5236\u81f3\u5173\u91cd\u8981\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">def extract_with_retry(file_path, model, max_retries=3):\n    for attempt in range(max_retries):\n        try:\n            return extract_structured_data(file_path, model)\n        except Exception as e:\n            if attempt == max_retries - 1:\n                print(f\"Failed to process {file_path} after {max_retries} attempts: {e}\")\n                return None\n            print(f\"Attempt {attempt+1} failed, retrying: {e}\")\n            time.sleep(2 ** attempt)  # \u6307\u6570\u9000\u907f\u7b56\u7565\n<\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/school.myshirtai.com\/wp-content\/uploads\/2025\/05\/rd-bench-example.jpg\" alt=\"\" class=\"wp-image-1270\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-\u8868\u683c\u5904\u7406\u4f18\u5316\">\u8868\u683c\u5904\u7406\u4f18\u5316<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u542b\u6709\u590d\u6742\u8868\u683c\u7684PDF\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u63d0\u793a\u8bcd\u6765\u63d0\u9ad8\u8868\u683c\u8bc6\u522b\u51c6\u786e\u7387\uff1a<\/p>\n\n\n\n<div class=\"wp-block-code\"><div class=\"xhcode-toolbar\"><i class=\"xhcode-icon-codesvg\"><\/i><span>PHP<\/span><\/div><pre><code lang=\"php\" class=\"language-php\">TABLE_EXTRACTION_PROMPT = \"\"\"Extract all tables from the PDF as HTML tables. \nPreserve the exact structure, including merged cells, headers, and formatting. \nEach table should be semantically complete and maintain the relationships between cells.\nFor numeric values, maintain their exact format as shown in the document.\"\"\"\n<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-\u7ed3\u8bed\">\u7ed3\u8bed<\/h2>\n\n\n\n<p>\u901a\u8fc7\u672c\u6587\u6240\u4ecb\u7ecd\u7684\u65b9\u6cd5\u548c\u793a\u4f8b\u4ee3\u7801\uff0c\u4f60\u5df2\u7ecf\u53ef\u4ee5\u5f00\u59cb\u5229\u7528Gemini 2.0\u6784\u5efa\u5f3a\u5927\u7684PDF\u6587\u6863\u5904\u7406\u7cfb\u7edf\u3002\u4ece\u7b80\u5355\u7684\u6587\u672c\u63d0\u53d6\u5230\u590d\u6742\u7684\u7ed3\u6784\u5316\u6570\u636e\u89e3\u6790\uff0c\u518d\u5230\u8bed\u4e49\u5206\u5757\uff0cGemini 2.0\u90fd\u5c55\u73b0\u51fa\u4e86\u5353\u8d8a\u7684\u6027\u80fd\u548c\u6781\u9ad8\u7684\u6027\u4ef7\u6bd4\u3002<\/p>\n\n\n\n<p>\u867d\u7136\u5728\u8fb9\u754c\u6846\u8bc6\u522b\u7b49\u65b9\u9762\u8fd8\u6709\u5f85\u63d0\u5347\uff0c\u4f46\u968f\u7740\u6280\u672f\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u6211\u4eec\u6709\u7406\u7531\u76f8\u4fe1\u672a\u6765\u7684PDF\u5904\u7406\u5c06\u53d8\u5f97\u66f4\u52a0\u667a\u80fd\u3001\u9ad8\u6548\u3002\u5bf9\u4e8e\u4efb\u4f55\u9700\u8981\u5927\u89c4\u6a21\u5904\u7406\u6587\u6863\u6570\u636e\u7684\u4e2a\u4eba\u6216\u7ec4\u7ec7\u6765\u8bf4\uff0cGemini 2.0\u65e0\u7591\u662f\u4e00\u4e2a\u503c\u5f97\u5173\u6ce8\u548c\u91c7\u7528\u7684\u6280\u672f\u7a81\u7834\u3002<\/p>\n\n\n\n<table style=\"width: 100%;border-collapse: collapse;border: 1px solid #ddd\">\r\n<thead>\r\n<tr style=\"height: 48px;background-color: #f5f5f5\">\r\n<th style=\"width: 50%;height: 48px;border: 1px solid #ddd;padding: 8px\">\r\n<h4 style=\"margin: 0\">\u66f4\u591a\u4ea7\u54c1\u8bf7\u67e5\u770b<\/h4>\r\n<\/th>\r\n<th style=\"width: 50%;height: 48px;border: 1px solid #ddd;padding: 8px\">\r\n<h4 style=\"margin: 0\">\u66f4\u591a\u5185\u5bb9\u8bf7\u67e5\u770b<\/h4>\r\n<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 63px\">\r\n<td style=\"width: 50%;height: 63px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/www.myshirtai.com\/\" data-linktype=\"2\">ShirtAI \u2013 \u6e17\u900f\u667a\u80fd<\/a><\/td>\r\n<td style=\"width: 50%;height: 63px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/www.myshirtai.com\/archives\/4425\" data-linktype=\"2\">AIGC\u5927\u6a21\u578b\uff1a\u5f00\u521b\u5de5\u7a0b\u4e0e\u79d1\u5b66\u53cc\u91cd\u9769\u547d\u65f6\u4ee3 \u2013 \u6e17\u900f\u667a\u80fd<\/a><\/td>\r\n<\/tr>\r\n<tr style=\"height: 61px\">\r\n<td style=\"width: 50%;height: 61px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/www.myshirtai.com\/\" data-linktype=\"2\">1:1\u8fd8\u539fClaude\u548cGPT\u5b98\u7f51 \u2013 AI\u4e91\u539f\u751f<\/a><\/td>\r\n<td style=\"width: 50%;height: 61px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/www.bluelsqkj.com\/archives\/2876\" data-linktype=\"2\">\u6bd4\u8d5b\u76f4\u64adAPP \u5168\u7403\u9ad8\u6e05\u4f53\u80b2\u89c2\u5f71\u64ad\u653e\u5668\uff08\u63a8\u8350\uff09 \u2013 \u84dd\u886b\u79d1\u6280<\/a><\/td>\r\n<\/tr>\r\n<tr style=\"height: 54px\">\r\n<td style=\"width: 50%;height: 54px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/api.mygptmeta.com\/\" data-linktype=\"2\">\u57fa\u4e8e\u5b98\u65b9API\u7684\u4e2d\u8f6c\u670d\u52a1 \u2013 GPTMeta API<\/a><\/td>\r\n<td style=\"width: 50%;height: 54px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/www.zhihu.com\/question\/621055223\/answer\/3633615705\" data-linktype=\"2\">\u6c42\u52a9\uff0c\u5404\u4f4d\u5927\u795e\u8c01\u80fd\u63d0\u4f9b\u4e00\u4e9bGPT\u7684\u63d0\u95ee\u6280\u5de7\uff1f\u2013 \u77e5\u4e4e<\/a><\/td>\r\n<\/tr>\r\n<tr style=\"height: 70px\">\r\n<td style=\"width: 50%;height: 70px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/shop.blueshirtmap.com\/\" data-linktype=\"2\">\u5168\u7403\u5316\u865a\u62df\u5546\u54c1\u6570\u5b57\u5546\u5e97 \u2013 \u73af\u7403\u667a\u8d2d\uff08\u51e4\u7075\u9601\uff09<\/a><\/td>\r\n<td style=\"width: 50%;height: 70px;border: 1px solid #ddd;padding: 8px\"><a href=\"https:\/\/www.bilibili.com\/video\/BV1efpneYE54\/?spm_id_from=333.1387.homepage.video_card.click\" data-linktype=\"2\">Claude airtfacts\u529f\u80fd\u6709\u591a\u5f3a\u5927\uff0cGPT\u77ac\u95f4\u4e0d\u9999\u4e86\uff1f-\u54d4\u54e9\u54d4\u54e9<\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>O modelo Gemini 2.0, introduzido pela Google DeepMind, melhora significativamente o processamento de documentos PDF. Em compara\u00e7\u00e3o com as solu\u00e7\u00f5es tradicionais em termos de precis\u00e3o, custo e defici\u00eancias de escalabilidade, o Gemini 2.0 optimiza significativamente o processo de an\u00e1lise de PDF atrav\u00e9s da extra\u00e7\u00e3o de dados estruturados, da fragmenta\u00e7\u00e3o sem\u00e2ntica e do processamento eficiente de lotes, e oferece uma variedade de op\u00e7\u00f5es de modelos para equilibrar o desempenho e o custo.<\/p>","protected":false},"author":1,"featured_media":6426,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[76],"tags":[73,82],"class_list":["post-6427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-depthknowledge","tag-gemini-model","tag-pdf-processing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.3 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5 - \u6e17\u900f\u667a\u80fd<\/title>\n<meta name=\"description\" content=\"Gemini 2.0\u6a21\u578b\u7531Google DeepMind\u63a8\u51fa\uff0c\u663e\u8457\u63d0\u5347\u4e86PDF\u6587\u6863\u5904\u7406\u80fd\u529b\u3002\u76f8\u6bd4\u4f20\u7edf\u65b9\u6848\u5728\u51c6\u786e\u6027\u3001\u6210\u672c\u548c\u6269\u5c55\u6027\u4e0a\u7684\u4e0d\u8db3\uff0cGemini 2.0\u901a\u8fc7\u7ed3\u6784\u5316\u6570\u636e\u63d0\u53d6\u3001\u8bed\u4e49\u5206\u5757\u53ca\u9ad8\u6548\u6279\u91cf\u5904\u7406\uff0c\u5927\u5e45\u4f18\u5316\u4e86PDF\u89e3\u6790\u6d41\u7a0b\uff0c\u5e76\u63d0\u4f9b\u591a\u79cd\u6a21\u578b\u9009\u62e9\u4ee5\u5e73\u8861\u6027\u80fd\u4e0e\u6210\u672c\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.myshirtai.com\/pt\/archives\/6427\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5\" \/>\n<meta property=\"og:description\" content=\"Gemini 2.0\u6a21\u578b\u7531Google DeepMind\u63a8\u51fa\uff0c\u663e\u8457\u63d0\u5347\u4e86PDF\u6587\u6863\u5904\u7406\u80fd\u529b\u3002\u76f8\u6bd4\u4f20\u7edf\u65b9\u6848\u5728\u51c6\u786e\u6027\u3001\u6210\u672c\u548c\u6269\u5c55\u6027\u4e0a\u7684\u4e0d\u8db3\uff0cGemini 2.0\u901a\u8fc7\u7ed3\u6784\u5316\u6570\u636e\u63d0\u53d6\u3001\u8bed\u4e49\u5206\u5757\u53ca\u9ad8\u6548\u6279\u91cf\u5904\u7406\uff0c\u5927\u5e45\u4f18\u5316\u4e86PDF\u89e3\u6790\u6d41\u7a0b\uff0c\u5e76\u63d0\u4f9b\u591a\u79cd\u6a21\u578b\u9009\u62e9\u4ee5\u5e73\u8861\u6027\u80fd\u4e0e\u6210\u672c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myshirtai.com\/pt\/archives\/6427\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6e17\u900f\u667a\u80fd\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-16T14:28:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2383\" \/>\n\t<meta property=\"og:image:height\" content=\"1255\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"IvesFeng666\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"IvesFeng666\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427\"},\"author\":{\"name\":\"IvesFeng666\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#\\\/schema\\\/person\\\/793ffae65b0212a937f22250e83b51e2\"},\"headline\":\"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5\",\"datePublished\":\"2025-05-16T14:28:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427\"},\"wordCount\":98,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.myshirtai.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Jietu20250213-233957@2x.jpg\",\"keywords\":[\"Gemini\u6a21\u578b\",\"PDF\u5904\u7406\"],\"articleSection\":[\"\u6df1\u5ea6\u5185\u5bb9\"],\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427\",\"url\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427\",\"name\":\"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5 - \u6e17\u900f\u667a\u80fd\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.myshirtai.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Jietu20250213-233957@2x.jpg\",\"datePublished\":\"2025-05-16T14:28:04+00:00\",\"description\":\"Gemini 2.0\u6a21\u578b\u7531Google DeepMind\u63a8\u51fa\uff0c\u663e\u8457\u63d0\u5347\u4e86PDF\u6587\u6863\u5904\u7406\u80fd\u529b\u3002\u76f8\u6bd4\u4f20\u7edf\u65b9\u6848\u5728\u51c6\u786e\u6027\u3001\u6210\u672c\u548c\u6269\u5c55\u6027\u4e0a\u7684\u4e0d\u8db3\uff0cGemini 2.0\u901a\u8fc7\u7ed3\u6784\u5316\u6570\u636e\u63d0\u53d6\u3001\u8bed\u4e49\u5206\u5757\u53ca\u9ad8\u6548\u6279\u91cf\u5904\u7406\uff0c\u5927\u5e45\u4f18\u5316\u4e86PDF\u89e3\u6790\u6d41\u7a0b\uff0c\u5e76\u63d0\u4f9b\u591a\u79cd\u6a21\u578b\u9009\u62e9\u4ee5\u5e73\u8861\u6027\u80fd\u4e0e\u6210\u672c\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#primaryimage\",\"url\":\"https:\\\/\\\/www.myshirtai.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Jietu20250213-233957@2x.jpg\",\"contentUrl\":\"https:\\\/\\\/www.myshirtai.com\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/Jietu20250213-233957@2x.jpg\",\"width\":2383,\"height\":1255},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/archives\\\/6427#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/www.myshirtai.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#website\",\"url\":\"https:\\\/\\\/www.myshirtai.com\\\/\",\"name\":\"\u6e17\u900f\u667a\u80fd\",\"description\":\"ShirtAI\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#organization\"},\"alternateName\":\"ShirtAI\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.myshirtai.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#organization\",\"name\":\"ShirtAI\",\"alternateName\":\"ShirtAI\",\"url\":\"https:\\\/\\\/www.myshirtai.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.myshirtai.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/ShirtAI1279\u00d7675.png\",\"contentUrl\":\"https:\\\/\\\/www.myshirtai.com\\\/wp-content\\\/uploads\\\/2023\\\/11\\\/ShirtAI1279\u00d7675.png\",\"width\":1200,\"height\":675,\"caption\":\"ShirtAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.myshirtai.com\\\/#\\\/schema\\\/person\\\/793ffae65b0212a937f22250e83b51e2\",\"name\":\"IvesFeng666\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0e40122f3ea588c331477d2b5778ab521f0ef9275880700b47f592c999e721b7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0e40122f3ea588c331477d2b5778ab521f0ef9275880700b47f592c999e721b7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0e40122f3ea588c331477d2b5778ab521f0ef9275880700b47f592c999e721b7?s=96&d=mm&r=g\",\"caption\":\"IvesFeng666\"},\"sameAs\":[\"http:\\\/\\\/www.myshirtai.com\"],\"url\":\"https:\\\/\\\/www.myshirtai.com\\\/pt\\\/archives\\\/author\\\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5 - \u6e17\u900f\u667a\u80fd","description":"O modelo Gemini 2.0, introduzido pela Google DeepMind, melhora significativamente o processamento de documentos PDF. Em compara\u00e7\u00e3o com as solu\u00e7\u00f5es tradicionais em termos de precis\u00e3o, custo e defici\u00eancias de escalabilidade, o Gemini 2.0 optimiza significativamente o processo de an\u00e1lise de PDF atrav\u00e9s da extra\u00e7\u00e3o de dados estruturados, da fragmenta\u00e7\u00e3o sem\u00e2ntica e do processamento eficiente de lotes, e oferece uma variedade de op\u00e7\u00f5es de modelos para equilibrar o desempenho e o custo.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.myshirtai.com\/pt\/archives\/6427\/","og_locale":"pt_PT","og_type":"article","og_title":"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5","og_description":"Gemini 2.0\u6a21\u578b\u7531Google DeepMind\u63a8\u51fa\uff0c\u663e\u8457\u63d0\u5347\u4e86PDF\u6587\u6863\u5904\u7406\u80fd\u529b\u3002\u76f8\u6bd4\u4f20\u7edf\u65b9\u6848\u5728\u51c6\u786e\u6027\u3001\u6210\u672c\u548c\u6269\u5c55\u6027\u4e0a\u7684\u4e0d\u8db3\uff0cGemini 2.0\u901a\u8fc7\u7ed3\u6784\u5316\u6570\u636e\u63d0\u53d6\u3001\u8bed\u4e49\u5206\u5757\u53ca\u9ad8\u6548\u6279\u91cf\u5904\u7406\uff0c\u5927\u5e45\u4f18\u5316\u4e86PDF\u89e3\u6790\u6d41\u7a0b\uff0c\u5e76\u63d0\u4f9b\u591a\u79cd\u6a21\u578b\u9009\u62e9\u4ee5\u5e73\u8861\u6027\u80fd\u4e0e\u6210\u672c\u3002","og_url":"https:\/\/www.myshirtai.com\/pt\/archives\/6427\/","og_site_name":"\u6e17\u900f\u667a\u80fd","article_published_time":"2025-05-16T14:28:04+00:00","og_image":[{"width":2383,"height":1255,"url":"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg","type":"image\/jpeg"}],"author":"IvesFeng666","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"IvesFeng666","Tempo estimado de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.myshirtai.com\/archives\/6427#article","isPartOf":{"@id":"https:\/\/www.myshirtai.com\/archives\/6427"},"author":{"name":"IvesFeng666","@id":"https:\/\/www.myshirtai.com\/#\/schema\/person\/793ffae65b0212a937f22250e83b51e2"},"headline":"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5","datePublished":"2025-05-16T14:28:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.myshirtai.com\/archives\/6427"},"wordCount":98,"commentCount":0,"publisher":{"@id":"https:\/\/www.myshirtai.com\/#organization"},"image":{"@id":"https:\/\/www.myshirtai.com\/archives\/6427#primaryimage"},"thumbnailUrl":"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg","keywords":["Gemini\u6a21\u578b","PDF\u5904\u7406"],"articleSection":["\u6df1\u5ea6\u5185\u5bb9"],"inLanguage":"pt-PT","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.myshirtai.com\/archives\/6427#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.myshirtai.com\/archives\/6427","url":"https:\/\/www.myshirtai.com\/archives\/6427","name":"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5 - \u6e17\u900f\u667a\u80fd","isPartOf":{"@id":"https:\/\/www.myshirtai.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.myshirtai.com\/archives\/6427#primaryimage"},"image":{"@id":"https:\/\/www.myshirtai.com\/archives\/6427#primaryimage"},"thumbnailUrl":"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg","datePublished":"2025-05-16T14:28:04+00:00","description":"O modelo Gemini 2.0, introduzido pela Google DeepMind, melhora significativamente o processamento de documentos PDF. Em compara\u00e7\u00e3o com as solu\u00e7\u00f5es tradicionais em termos de precis\u00e3o, custo e defici\u00eancias de escalabilidade, o Gemini 2.0 optimiza significativamente o processo de an\u00e1lise de PDF atrav\u00e9s da extra\u00e7\u00e3o de dados estruturados, da fragmenta\u00e7\u00e3o sem\u00e2ntica e do processamento eficiente de lotes, e oferece uma variedade de op\u00e7\u00f5es de modelos para equilibrar o desempenho e o custo.","breadcrumb":{"@id":"https:\/\/www.myshirtai.com\/archives\/6427#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myshirtai.com\/archives\/6427"]}]},{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/www.myshirtai.com\/archives\/6427#primaryimage","url":"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg","contentUrl":"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg","width":2383,"height":1255},{"@type":"BreadcrumbList","@id":"https:\/\/www.myshirtai.com\/archives\/6427#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.myshirtai.com\/"},{"@type":"ListItem","position":2,"name":"Gemini 2.0 PDF\u89e3\u6790\u5168\u653b\u7565\uff1a\u4ee3\u7801\u5b9e\u4f8b\u4e0e\u6700\u4f73\u5b9e\u8df5"}]},{"@type":"WebSite","@id":"https:\/\/www.myshirtai.com\/#website","url":"https:\/\/www.myshirtai.com\/","name":"intelig\u00eancia osm\u00f3tica","description":"CamisaAI","publisher":{"@id":"https:\/\/www.myshirtai.com\/#organization"},"alternateName":"ShirtAI","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myshirtai.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-PT"},{"@type":"Organization","@id":"https:\/\/www.myshirtai.com\/#organization","name":"CamisaAI","alternateName":"ShirtAI","url":"https:\/\/www.myshirtai.com\/","logo":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/www.myshirtai.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2023\/11\/ShirtAI1279\u00d7675.png","contentUrl":"https:\/\/www.myshirtai.com\/wp-content\/uploads\/2023\/11\/ShirtAI1279\u00d7675.png","width":1200,"height":675,"caption":"ShirtAI"},"image":{"@id":"https:\/\/www.myshirtai.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.myshirtai.com\/#\/schema\/person\/793ffae65b0212a937f22250e83b51e2","name":"IvesFeng666","image":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/secure.gravatar.com\/avatar\/0e40122f3ea588c331477d2b5778ab521f0ef9275880700b47f592c999e721b7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0e40122f3ea588c331477d2b5778ab521f0ef9275880700b47f592c999e721b7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0e40122f3ea588c331477d2b5778ab521f0ef9275880700b47f592c999e721b7?s=96&d=mm&r=g","caption":"IvesFeng666"},"sameAs":["http:\/\/www.myshirtai.com"],"url":"https:\/\/www.myshirtai.com\/pt\/archives\/author\/admin"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x.jpg",2383,1255,false],"thumbnail":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x-150x79.jpg",150,79,true],"medium":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x-1024x539.jpg",1024,539,true],"medium_large":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x-768x404.jpg",768,404,true],"large":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x-2048x1079.jpg",2048,1079,true],"1536x1536":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x-1536x809.jpg",1536,809,true],"2048x2048":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x-2048x1079.jpg",2048,1079,true],"trp-custom-language-flag":["https:\/\/www.myshirtai.com\/wp-content\/uploads\/2025\/05\/Jietu20250213-233957@2x-18x9.jpg",18,9,true]},"uagb_author_info":{"display_name":"IvesFeng666","author_link":"https:\/\/www.myshirtai.com\/pt\/archives\/author\/admin"},"uagb_comment_info":0,"uagb_excerpt":"Gemini 2.0\u6a21\u578b\u7531Google DeepMind\u63a8\u51fa\uff0c\u663e\u8457\u63d0\u5347\u4e86PDF\u6587\u6863\u5904\u7406\u80fd\u529b\u3002\u76f8\u6bd4\u4f20\u7edf\u65b9\u6848\u5728\u51c6\u786e&hellip;","_links":{"self":[{"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/posts\/6427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/comments?post=6427"}],"version-history":[{"count":0,"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/posts\/6427\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/media\/6426"}],"wp:attachment":[{"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/media?parent=6427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/categories?post=6427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myshirtai.com\/pt\/wp-json\/wp\/v2\/tags?post=6427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}