নথি বোঝা

জেমিনি মডেলগুলো তাদের নিজস্ব ভিশন ব্যবহার করে সম্পূর্ণ ডকুমেন্টের প্রেক্ষাপট বুঝতে পারে এবং পিডিএফ ফরম্যাটের ডকুমেন্ট প্রসেস করতে পারে। এটি শুধু টেক্সট নিষ্কাশনের বাইরেও কাজ করে, যা জেমিনিকে নিম্নলিখিত কাজগুলো করতে সক্ষম করে:

  • পাঠ্য, ছবি, ডায়াগ্রাম, চার্ট এবং টেবিল সহ বিষয়বস্তু বিশ্লেষণ ও ব্যাখ্যা করুন, এমনকি ১০০০ পৃষ্ঠা পর্যন্ত দীর্ঘ নথির ক্ষেত্রেও।
  • তথ্যকে সুসংগঠিত আউটপুট ফরম্যাটে রূপান্তর করুন।
  • একটি নথির দৃশ্যমান এবং লিখিত উভয় উপাদানের উপর ভিত্তি করে সারসংক্ষেপ করুন এবং প্রশ্নগুলোর উত্তর দিন।
  • পরবর্তী অ্যাপ্লিকেশনগুলিতে ব্যবহারের জন্য, লেআউট এবং ফরম্যাটিং অক্ষুণ্ণ রেখে ডকুমেন্টের বিষয়বস্তু প্রতিলিপি করুন (যেমন HTML-এ)।

আপনি একইভাবে নন-পিডিএফ ডকুমেন্টও পাঠাতে পারেন, কিন্তু জেমিনি সেগুলোকে সাধারণ টেক্সট হিসেবে দেখবে, যার ফলে চার্ট বা ফরম্যাটিং-এর মতো প্রাসঙ্গিক বিষয়গুলো বাদ পড়ে যাবে।

পিডিএফ ডেটা ইনলাইনে পাস করা

আপনি অনুরোধের মধ্যেই পিডিএফ ডেটা ইনলাইনভাবে পাঠাতে পারেন। এটি ছোট আকারের ডকুমেন্ট বা অস্থায়ী প্রক্রিয়াকরণের জন্য সবচেয়ে উপযুক্ত, যেখানে পরবর্তী অনুরোধগুলিতে ফাইলটির উল্লেখ করার প্রয়োজন হয় না। অনুরোধের বিলম্ব কমাতে এবং ব্যান্ডউইথের ব্যবহার হ্রাস করতে, আমরা বড় আকারের ডকুমেন্টগুলির জন্য ফাইলস এপিআই (Files API) ব্যবহারের পরামর্শ দিই, যেগুলি আপনাকে একাধিক ধাপে ব্যবহারের জন্য উল্লেখ করতে হবে।

নিম্নলিখিত উদাহরণটি দেখায় কিভাবে পিডিএফ ডেটা ইনলাইনে পাস করতে হয়:

পাইথন

from google import genai
import base64

client = genai.Client()

with open('path/to/document.pdf', 'rb') as f:
    pdf_bytes = f.read()

interaction = client.interactions.create(
    model="gemini-3-flash-preview",
    input=[
        {
            "type": "document",
            "data": base64.b64encode(pdf_bytes).decode('utf-8'),
            "mime_type": "application/pdf"
        },
        {"type": "text", "text": "Summarize this document"}
    ]
)

print(interaction.steps[-1].content[0].text)

জাভাস্ক্রিপ্ট

import { GoogleGenAI } from "@google/genai";
import * as fs from "node:fs";

const ai = new GoogleGenAI({});

async function main() {
    const pdfData = fs.readFileSync("path/to/document.pdf", {
        encoding: "base64"
    });

    const interaction = await ai.interactions.create({
        model: "gemini-3-flash-preview",
        input: [
            { type: "text", text: "Summarize this document" },
            {
                type: "document",
                data: pdfData,
                mimeType: "application/pdf"
            }
        ]
    });
    console.log(interaction.steps.at(-1).content[0].text);
}

main();

বিশ্রাম

PDF_PATH="path/to/document.pdf"

if [[ "$(base64 --version 2>&1)" = *"FreeBSD"* ]]; then
  B64FLAGS="--input"
else
  B64FLAGS="-w0"
fi

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gemini-3-flash-preview",
    "input": [
      {
        "type": "document",
        "data": "'$(base64 $B64FLAGS $PDF_PATH)'",
        "mimeType": "application/pdf"
      },
      {"type": "text", "text": "Summarize this document"}
    ]
  }'

প্রক্রিয়াকরণের জন্য আপনি একটি স্থানীয় পিডিএফ ফাইলও আপলোড করতে পারেন:

পাইথন

from google import genai

client = genai.Client()

uploaded_file = client.files.upload(file="file.pdf")

interaction = client.interactions.create(
    model="gemini-3-flash-preview",
    input=[
        {"type": "document", "uri": uploaded_file.uri, "mime_type": uploaded_file.mime_type},
        {"type": "text", "text": "Summarize this document"}
    ]
)
print(interaction.steps[-1].content[0].text)

জাভাস্ক্রিপ্ট

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function main() {
    const uploadedFile = await ai.files.upload({
        file: "file.pdf",
        config: { mimeType: "application/pdf" }
    });

    const interaction = await ai.interactions.create({
        model: "gemini-3-flash-preview",
        input: [
            { type: "text", text: "Summarize this document" },
            {
                type: "document",
                uri: uploadedFile.uri,
                mimeType: uploadedFile.mimeType
            }
        ]
    });
    console.log(interaction.steps.at(-1).content[0].text);
}

main();

ফাইলস এপিআই ব্যবহার করে পিডিএফ আপলোড করা

বড় ফাইলের জন্য অথবা একাধিক অনুরোধে কোনো ডকুমেন্ট পুনরায় ব্যবহার করার ক্ষেত্রে আমরা আপনাকে ফাইলস এপিআই (Files API) ব্যবহার করার পরামর্শ দিই। এটি মডেল অনুরোধ থেকে ফাইল আপলোডকে বিচ্ছিন্ন করার মাধ্যমে অনুরোধের লেটেন্সি উন্নত করে এবং ব্যান্ডউইথের ব্যবহার কমায়।

ইউআরএল থেকে বড় আকারের পিডিএফ

URL থেকে বড় আকারের PDF ফাইল আপলোড ও প্রসেস করা সহজ করতে ফাইল API ব্যবহার করুন:

পাইথন

from google import genai
import io
import httpx

client = genai.Client()

long_context_pdf_path = "https://www.nasa.gov/wp-content/uploads/static/history/alsj/a17/A17_FlightPlan.pdf"

# Retrieve and upload the PDF using the File API
doc_io = io.BytesIO(httpx.get(long_context_pdf_path).content)

sample_doc = client.files.upload(
  # You can pass a path or a file-like object here
  file=doc_io,
  config=dict(
    mime_type='application/pdf')
)

prompt = "Summarize this document"

interaction = client.interactions.create(
    model="gemini-3-flash-preview",
    input=[
        {"type": "document", "uri": sample_doc.uri, "mime_type": sample_doc.mime_type},
        {"type": "text", "text": prompt}
    ]
)
print(interaction.steps[-1].content[0].text)

জাভাস্ক্রিপ্ট

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function main() {

    const pdfBuffer = await fetch("https://www.nasa.gov/wp-content/uploads/static/history/alsj/a17/A17_FlightPlan.pdf")
        .then((response) => response.arrayBuffer());

    const fileBlob = new Blob([pdfBuffer], { type: 'application/pdf' });

    const file = await ai.files.upload({
        file: fileBlob,
        config: {
            displayName: 'A17_FlightPlan.pdf',
        },
    });

    // Wait for the file to be processed.
    let getFile = await ai.files.get({ name: file.name });
    while (getFile.state === 'PROCESSING') {
        getFile = await ai.files.get({ name: file.name });
        console.log(`current file status: ${getFile.state}`);
        console.log('File is still processing, retrying in 5 seconds');

        await new Promise((resolve) => {
            setTimeout(resolve, 5000);
        });
    }
    if (file.state === 'FAILED') {
        throw new Error('File processing failed.');
    }

    const interaction = await ai.interactions.create({
        model: 'gemini-3-flash-preview',
        input: [
            { type: "document", uri: file.uri, mimeType: file.mimeType },
            { type: "text", text: "Summarize this document" }
        ],
    });

    console.log(interaction.steps.at(-1).content[0].text);

}

main();

বিশ্রাম

PDF_PATH="https://www.nasa.gov/wp-content/uploads/static/history/alsj/a17/A17_FlightPlan.pdf"
DISPLAY_NAME="A17_FlightPlan"
PROMPT="Summarize this document"

# Download the PDF from the provided URL
wget -O "${DISPLAY_NAME}.pdf" "${PDF_PATH}"

MIME_TYPE=$(file -b --mime-type "${DISPLAY_NAME}.pdf")
NUM_BYTES=$(wc -c < "${DISPLAY_NAME}.pdf")

echo "MIME_TYPE: ${MIME_TYPE}"
echo "NUM_BYTES: ${NUM_BYTES}"

tmp_header_file=upload-header.tmp

# Initial resumable request defining metadata.
# The upload url is in the response headers dump them to a file.
curl "https://generativelanguage.googleapis.com/upload/v1beta/files?key=${GOOGLE_API_KEY}" \
  -D upload-header.tmp \
  -H "X-Goog-Upload-Protocol: resumable" \
  -H "X-Goog-Upload-Command: start" \
  -H "X-Goog-Upload-Header-Content-Length: ${NUM_BYTES}" \
  -H "X-Goog-Upload-Header-Content-Type: ${MIME_TYPE}" \
  -H "Content-Type: application/json" \
  -d "{'file': {'display_name': '${DISPLAY_NAME}'}}" 2> /dev/null

upload_url=$(grep -i "x-goog-upload-url: " "${tmp_header_file}" | cut -d" " -f2 | tr -d "\r")
rm "${tmp_header_file}"

# Upload the actual bytes.
curl "${upload_url}" \
  -H "Content-Length: ${NUM_BYTES}" \
  -H "X-Goog-Upload-Offset: 0" \
  -H "X-Goog-Upload-Command: upload, finalize" \
  --data-binary "@${DISPLAY_NAME}.pdf" 2> /dev/null > file_info.json

file_uri=$(jq ".file.uri" file_info.json)
echo "file_uri: ${file_uri}"

# Now create an interaction using that file
curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
    -H "x-goog-api-key: $GOOGLE_API_KEY" \
    -H 'Content-Type: application/json' \
    -X POST \
    -d '{
      "model": "gemini-3-flash-preview",
      "input": [
        {"type": "text", "text": "'$PROMPT'"},
        {"type": "document", "uri": '$file_uri', "mimeType": "application/pdf"}
      ]
    }' 2> /dev/null > response.json

cat response.json
echo

jq ".steps[-1].content[0].text" response.json

# Clean up the downloaded PDF
rm "${DISPLAY_NAME}.pdf"

স্থানীয়ভাবে সংরক্ষিত বড় পিডিএফ ফাইল

পাইথন

from google import genai
import pathlib

client = genai.Client()

# Upload the PDF using the File API
file_path = pathlib.Path('large_file.pdf')
sample_file = client.files.upload(
    file=file_path,
)

interaction = client.interactions.create(
    model="gemini-3-flash-preview",
    input=[
        {"type": "document", "uri": sample_file.uri, "mime_type": sample_file.mime_type},
        {"type": "text", "text": "Summarize this document"}
    ]
)
print(interaction.steps[-1].content[0].text)

জাভাস্ক্রিপ্ট

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function main() {
    const file = await ai.files.upload({
        file: 'path-to-localfile.pdf',
        config: {
            displayName: 'A17_FlightPlan.pdf',
        },
    });

    // Wait for the file to be processed.
    let getFile = await ai.files.get({ name: file.name });
    while (getFile.state === 'PROCESSING') {
        getFile = await ai.files.get({ name: file.name });
        console.log(`current file status: ${getFile.state}`);
        console.log('File is still processing, retrying in 5 seconds');

        await new Promise((resolve) => {
            setTimeout(resolve, 5000);
        });
    }
    if (file.state === 'FAILED') {
        throw new Error('File processing failed.');
    }

    const interaction = await ai.interactions.create({
        model: 'gemini-3-flash-preview',
        input: [
            { type: "document", uri: file.uri, mimeType: file.mimeType },
            { type: "text", text: "Summarize this document" }
        ],
    });

    console.log(interaction.steps.at(-1).content[0].text);

}

main();

বিশ্রাম

PDF_PATH="path/to/large_file.pdf"
NUM_BYTES=$(wc -c < "${PDF_PATH}")
DISPLAY_NAME=TEXT
tmp_header_file=upload-header.tmp

# Initial resumable request defining metadata.
# The upload url is in the response headers dump them to a file.
curl "https://generativelanguage.googleapis.com/upload/v1beta/files?key=${GEMINI_API_KEY}" \
  -D upload-header.tmp \
  -H "X-Goog-Upload-Protocol: resumable" \
  -H "X-Goog-Upload-Command: start" \
  -H "X-Goog-Upload-Header-Content-Length: ${NUM_BYTES}" \
  -H "X-Goog-Upload-Header-Content-Type: application/pdf" \
  -H "Content-Type: application/json" \
  -d "{'file': {'display_name': '${DISPLAY_NAME}'}}" 2> /dev/null

upload_url=$(grep -i "x-goog-upload-url: " "${tmp_header_file}" | cut -d" " -f2 | tr -d "\r")
rm "${tmp_header_file}"

# Upload the actual bytes.
curl "${upload_url}" \
  -H "Content-Length: ${NUM_BYTES}" \
  -H "X-Goog-Upload-Offset: 0" \
  -H "X-Goog-Upload-Command: upload, finalize" \
  --data-binary "@${PDF_PATH}" 2> /dev/null > file_info.json

file_uri=$(jq ".file.uri" file_info.json)
echo file_uri=$file_uri

# Now create an interaction using that file
curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
    -H "x-goog-api-key: $GEMINI_API_KEY" \
    -H 'Content-Type: application/json' \
    -X POST \
    -d '{
      "model": "gemini-3-flash-preview",
      "input": [
        {"type": "document", "uri": '$file_uri', "mimeType": "application/pdf"},
        {"type": "text", "text": "Can you add a few more lines to this poem?"}
      ]
    }' 2> /dev/null > response.json

cat response.json
echo

jq ".steps[-1].content[0].text" response.json

এপিআই আপলোড করা ফাইলটি সফলভাবে সংরক্ষণ করেছে কিনা তা যাচাই করতে এবং এর মেটাডেটা পেতে files.get কল করতে পারেন। শুধুমাত্র name (এবং সেই সূত্রে, uri ) অনন্য।

পাইথন

from google import genai
import pathlib

client = genai.Client()

fpath = pathlib.Path('example.pdf')
fpath.write_text('hello')

file = client.files.upload(file='example.pdf')

file_info = client.files.get(name=file.name)
print(file_info.model_dump_json(indent=4))

বিশ্রাম

name=$(jq ".file.name" file_info.json)
# Get the file of interest to check state
curl https://generativelanguage.googleapis.com/v1beta/files/$name?key=$GEMINI_API_KEY > file_info.json
# Print some information about the file you got
name=$(jq ".file.name" file_info.json)
echo name=$name
file_uri=$(jq ".file.uri" file_info.json)
echo file_uri=$file_uri

একাধিক পিডিএফ পাস করা

জেমিনি এপিআই একটিমাত্র অনুরোধে একাধিক পিডিএফ ডকুমেন্ট (১০০০ পৃষ্ঠা পর্যন্ত) প্রসেস করতে সক্ষম, তবে শর্ত হলো ডকুমেন্টগুলোর সম্মিলিত আকার এবং টেক্সট প্রম্পটকে অবশ্যই মডেলের কনটেক্সট উইন্ডোর মধ্যে থাকতে হবে।

পাইথন

from google import genai
import io
import httpx

client = genai.Client()

doc_url_1 = "https://arxiv.org/pdf/2312.11805"
doc_url_2 = "https://arxiv.org/pdf/2403.05530"

# Retrieve and upload both PDFs using the File API
doc_data_1 = io.BytesIO(httpx.get(doc_url_1).content)
doc_data_2 = io.BytesIO(httpx.get(doc_url_2).content)

sample_pdf_1 = client.files.upload(
  file=doc_data_1,
  config=dict(mime_type='application/pdf')
)
sample_pdf_2 = client.files.upload(
  file=doc_data_2,
  config=dict(mime_type='application/pdf')
)

prompt = "What is the difference between each of the main benchmarks between these two papers? Output these in a table."

interaction = client.interactions.create(
    model="gemini-3-flash-preview",
    input=[
        {"type": "document", "uri": sample_pdf_1.uri, "mime_type": sample_pdf_1.mime_type},
        {"type": "document", "uri": sample_pdf_2.uri, "mime_type": sample_pdf_2.mime_type},
        {"type": "text", "text": prompt}
    ]
)

print(interaction.steps[-1].content[0].text)

জাভাস্ক্রিপ্ট

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({});

async function uploadRemotePDF(url, displayName) {
    const pdfBuffer = await fetch(url)
        .then((response) => response.arrayBuffer());

    const fileBlob = new Blob([pdfBuffer], { type: 'application/pdf' });

    const file = await ai.files.upload({
        file: fileBlob,
        config: {
            displayName: displayName,
        },
    });

    // Wait for the file to be processed.
    let getFile = await ai.files.get({ name: file.name });
    while (getFile.state === 'PROCESSING') {
        getFile = await ai.files.get({ name: file.name });
        console.log(`current file status: ${getFile.state}`);
        console.log('File is still processing, retrying in 5 seconds');

        await new Promise((resolve) => {
            setTimeout(resolve, 5000);
        });
    }
    if (file.state === 'FAILED') {
        throw new Error('File processing failed.');
    }

    return file;
}

async function main() {
    const file1 = await uploadRemotePDF("https://arxiv.org/pdf/2312.11805", "PDF 1");
    const file2 = await uploadRemotePDF("https://arxiv.org/pdf/2403.05530", "PDF 2");

    const interaction = await ai.interactions.create({
        model: 'gemini-3-flash-preview',
        input: [
            { type: "document", uri: file1.uri, mimeType: file1.mimeType },
            { type: "document", uri: file2.uri, mimeType: file2.mimeType },
            { type: "text", text: "What is the difference between each of the main benchmarks between these two papers? Output these in a table." }
        ],
    });

    console.log(interaction.steps.at(-1).content[0].text);
}

main();

বিশ্রাম

DOC_URL_1="https://arxiv.org/pdf/2312.11805"
DOC_URL_2="https://arxiv.org/pdf/2403.05530"
DISPLAY_NAME_1="Gemini_paper"
DISPLAY_NAME_2="Gemini_1.5_paper"
PROMPT="What is the difference between each of the main benchmarks between these two papers? Output these in a table."

# Function to download and upload a PDF
upload_pdf() {
  local doc_url="$1"
  local display_name="$2"

  # Download the PDF
  wget -O "${display_name}.pdf" "${doc_url}"

  local MIME_TYPE=$(file -b --mime-type "${display_name}.pdf")
  local NUM_BYTES=$(wc -c < "${display_name}.pdf")

  echo "MIME_TYPE: ${MIME_TYPE}"
  echo "NUM_BYTES: ${NUM_BYTES}"

  local tmp_header_file=upload-header.tmp

  # Initial resumable request
  curl "https://generativelanguage.googleapis.com/upload/v1beta/files?key=${GOOGLE_API_KEY}" \
    -D "${tmp_header_file}" \
    -H "X-Goog-Upload-Protocol: resumable" \
    -H "X-Goog-Upload-Command: start" \
    -H "X-Goog-Upload-Header-Content-Length: ${NUM_BYTES}" \
    -H "X-Goog-Upload-Header-Content-Type: ${MIME_TYPE}" \
    -H "Content-Type: application/json" \
    -d "{'file': {'display_name': '${display_name}'}}" 2> /dev/null

  local upload_url=$(grep -i "x-goog-upload-url: " "${tmp_header_file}" | cut -d" " -f2 | tr -d "\r")
  rm "${tmp_header_file}"

  # Upload the PDF
  curl "${upload_url}" \
    -H "Content-Length: ${NUM_BYTES}" \
    -H "X-Goog-Upload-Offset: 0" \
    -H "X-Goog-Upload-Command: upload, finalize" \
    --data-binary "@${display_name}.pdf" 2> /dev/null > "file_info_${display_name}.json"

  local file_uri=$(jq ".file.uri" "file_info_${display_name}.json")
  echo "file_uri for ${display_name}: ${file_uri}"

  # Clean up the downloaded PDF
  rm "${display_name}.pdf"

  echo "${file_uri}"
}

# Upload the first PDF
file_uri_1=$(upload_pdf "${DOC_URL_1}" "${DISPLAY_NAME_1}")

# Upload the second PDF
file_uri_2=$(upload_pdf "${DOC_URL_2}" "${DISPLAY_NAME_2}")

# Now create an interaction using both files
curl "https://generativelanguage.googleapis.com/v1beta/interactions" \
    -H "x-goog-api-key: $GOOGLE_API_KEY" \
    -H 'Content-Type: application/json' \
    -X POST \
    -d '{
      "model": "gemini-3-flash-preview",
      "input": [
        {"type": "document", "uri": '$file_uri_1', "mimeType": "application/pdf"},
        {"type": "document", "uri": '$file_uri_2', "mimeType": "application/pdf"},
        {"type": "text", "text": "'$PROMPT'"}
      ]
    }' 2> /dev/null > response.json

cat response.json
echo

jq ".steps[-1].content[0].text" response.json

প্রযুক্তিগত বিবরণ

জেমিনি ৫০ মেগাবাইট বা ১০০০ পৃষ্ঠা পর্যন্ত পিডিএফ ফাইল সমর্থন করে। এই সীমাটি ইনলাইন ডেটা এবং ফাইলস এপিআই আপলোড, উভয়ের ক্ষেত্রেই প্রযোজ্য। ডকুমেন্টের প্রতিটি পৃষ্ঠা ২৫৮টি টোকেনের সমতুল্য।

মডেলের কনটেক্সট উইন্ডো ছাড়া একটি ডকুমেন্টে পিক্সেল সংখ্যার কোনো নির্দিষ্ট সীমা না থাকলেও, বড় পেজগুলোকে তাদের মূল অ্যাস্পেক্ট রেশিও বজায় রেখে সর্বোচ্চ ৩০৭২ x ৩০৭২ রেজোলিউশনে ছোট করা হয়, এবং ছোট পেজগুলোকে ৭৬৮ x ৭৬৮ পিক্সেলে বড় করা হয়। ব্যান্ডউইথ ছাড়া ছোট আকারের পেজগুলোর জন্য খরচে কোনো হ্রাস হয় না, অথবা উচ্চ রেজোলিউশনের পেজগুলোর জন্য পারফরম্যান্সের কোনো উন্নতি হয় না।

জেমিনি ৩ মডেল

জেমিনি ৩-এ media_resolution প্যারামিটারের মাধ্যমে মাল্টিমোডাল ভিশন প্রসেসিংয়ের ওপর সূক্ষ্ম নিয়ন্ত্রণের সুবিধা আনা হয়েছে। এখন আপনি প্রতিটি মিডিয়া অংশের জন্য আলাদাভাবে রেজোলিউশন লো, মিডিয়াম বা হাই সেট করতে পারবেন। এই সংযোজনের ফলে পিডিএফ ডকুমেন্টের প্রসেসিং আপডেট করা হয়েছে:

  1. নেটিভ টেক্সট অন্তর্ভুক্তি: পিডিএফ-এ স্বাভাবিকভাবে এমবেড করা টেক্সট নিষ্কাশন করে মডেলকে সরবরাহ করা হয়।
  2. বিলিং ও টোকেন রিপোর্টিং:
    • পিডিএফ থেকে নিষ্কাশিত মূল টেক্সট থেকে উৎপন্ন টোকেনগুলির জন্য আপনাকে কোনো চার্জ করা হয় না
    • এপিআই রেসপন্সের usage_metadata সেকশনে, পিডিএফ পেজ (ইমেজ হিসেবে) প্রসেস করার ফলে তৈরি হওয়া টোকেনগুলোকে এখন IMAGE মোডালিটির অধীনে গণনা করা হয়; আগের কিছু ভার্সনের মতো আলাদা DOCUMENT মোডালিটির অধীনে নয়।

নথির প্রকার

প্রযুক্তিগতভাবে, ডকুমেন্ট বোঝার জন্য আপনি অন্যান্য MIME টাইপ, যেমন TXT, Markdown, HTML, XML, ইত্যাদি পাস করতে পারেন। তবে, ডকুমেন্ট ভিশন শুধুমাত্র PDF ফাইলকেই অর্থপূর্ণভাবে বুঝতে পারে । অন্যান্য টাইপের ফাইল বিশুদ্ধ টেক্সট হিসেবে গৃহীত হবে এবং মডেলটি সেই ফাইলগুলোর রেন্ডারিং-এ যা দেখা যায় তা ব্যাখ্যা করতে পারবে না। চার্ট, ডায়াগ্রাম, HTML ট্যাগ, Markdown ফরম্যাটিং ইত্যাদির মতো ফাইল-টাইপের যেকোনো নির্দিষ্ট বৈশিষ্ট্য হারিয়ে যাবে।

অন্যান্য ফাইল ইনপুট পদ্ধতি সম্পর্কে জানতে, ফাইল ইনপুট পদ্ধতি নির্দেশিকাটি দেখুন।

সর্বোত্তম অনুশীলন

সর্বোত্তম ফলাফলের জন্য:

  • আপলোড করার আগে পৃষ্ঠাগুলো সঠিক বিন্যাসে ঘুরিয়ে নিন।
  • ঝাপসা পৃষ্ঠা এড়িয়ে চলুন।
  • একক পৃষ্ঠা ব্যবহার করলে, পৃষ্ঠার পরে টেক্সট প্রম্পটটি রাখুন।

এরপর কী?

আরও জানতে, নিম্নলিখিত উৎসগুলো দেখুন:

  • ফাইল প্রম্পটিং কৌশল : জেমিনি এপিআই টেক্সট, ছবি, অডিও এবং ভিডিও ডেটা দিয়ে প্রম্পটিং সমর্থন করে, যা মাল্টিমোডাল প্রম্পটিং নামেও পরিচিত।
  • সিস্টেম নির্দেশাবলী : সিস্টেম নির্দেশাবলী আপনাকে আপনার নির্দিষ্ট প্রয়োজন এবং ব্যবহারের ক্ষেত্র অনুযায়ী মডেলের আচরণ নিয়ন্ত্রণ করতে দেয়।