জেমিনি এপিআই ছবি, অডিও, কোড, টুলস এবং আরও অনেক কিছু দিয়ে কন্টেন্ট তৈরি করা সমর্থন করে। এই প্রতিটি ফিচারের বিস্তারিত জানতে, পড়তে থাকুন এবং নির্দিষ্ট কাজের জন্য তৈরি স্যাম্পল কোডগুলো দেখুন, অথবা বিশদ গাইডগুলো পড়ুন।
- টেক্সট তৈরি
- দৃষ্টি
- অডিও
- এমবেডিং
- দীর্ঘ প্রেক্ষাপট
- কোড এক্সিকিউশন
- JSON মোড
- ফাংশন কলিং
- সিস্টেম নির্দেশাবলী
পদ্ধতি: models.generateContent
GenerateContentRequest ইনপুটের ভিত্তিতে একটি মডেল রেসপন্স তৈরি করে। বিস্তারিত ব্যবহারবিধির জন্য টেক্সট জেনারেশন গাইড দেখুন। টিউনড মডেল সহ বিভিন্ন মডেলের ইনপুট ক্ষমতা ভিন্ন হয়ে থাকে। বিস্তারিত তথ্যের জন্য মডেল গাইড এবং টিউনিং গাইড দেখুন।
এন্ডপয়েন্ট
পোস্টhttps: / /generativelanguage.googleapis.com /v1beta /{model=models /*}:generateContentপথের পরামিতি
modelstring আবশ্যক। সমাপ্তি তৈরির জন্য ব্যবহৃত Model নাম।
ফর্ম্যাট: models/{model} । এটি models/{model} আকারে থাকে।
অনুরোধকারী শরীর
অনুরোধের মূল অংশে নিম্নলিখিত কাঠামোসহ ডেটা থাকে:
tools[]object ( Tool ) ঐচ্ছিক। পরবর্তী প্রতিক্রিয়া তৈরি করতে Model Tools ব্যবহার করতে পারে তার একটি তালিকা।
Tool হলো এক খণ্ড কোড যা সিস্টেমকে বাহ্যিক সিস্টেমের সাথে যোগাযোগ করে Model জ্ঞান ও পরিধির বাইরে কোনো একটি বা একাধিক কাজ সম্পাদন করতে সক্ষম করে। সমর্থিত Tool হলো Function এবং codeExecution । আরও জানতে ফাংশন কলিং এবং কোড এক্সিকিউশন গাইডগুলো দেখুন।
toolConfigobject ( ToolConfig ) ঐচ্ছিক। অনুরোধে উল্লেখিত যেকোনো Tool জন্য টুল কনফিগারেশন। ব্যবহারের উদাহরণের জন্য ফাংশন কলিং গাইড দেখুন।
safetySettings[]object ( SafetySetting ) ঐচ্ছিক। অনিরাপদ কন্টেন্ট ব্লক করার জন্য স্বতন্ত্র SafetySetting ইনস্ট্যান্সগুলোর একটি তালিকা।
এটি GenerateContentRequest.contents এবং GenerateContentResponse.candidates এর উপর প্রয়োগ করা হবে। প্রতিটি SafetyCategory টাইপের জন্য একাধিক সেটিং থাকা উচিত নয়। এই সেটিংগুলো দ্বারা নির্ধারিত থ্রেশহোল্ড পূরণ করতে ব্যর্থ হলে API সেই সমস্ত কন্টেন্ট এবং রেসপন্স ব্লক করে দেবে। এই তালিকাটি safetySettings-এ উল্লেখিত প্রতিটি SafetyCategory জন্য ডিফল্ট সেটিংগুলোকে ওভাররাইড করে। তালিকায় কোনো নির্দিষ্ট SafetyCategory জন্য SafetySetting না থাকলে, API সেই ক্যাটাগরির জন্য ডিফল্ট সেফটি সেটিং ব্যবহার করবে। HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK হার্ম ক্যাটাগরিগুলো সমর্থিত। উপলব্ধ সেফটি সেটিংস সম্পর্কে বিস্তারিত তথ্যের জন্য গাইডটি দেখুন। আপনার এআই অ্যাপ্লিকেশনগুলিতে কীভাবে নিরাপত্তা সংক্রান্ত বিষয়গুলি অন্তর্ভুক্ত করবেন তা জানতে নিরাপত্তা নির্দেশিকাটিও দেখুন।
systemInstructionobject ( Content )ঐচ্ছিক। ডেভেলপার কর্তৃক নির্ধারিত সিস্টেম নির্দেশাবলী । বর্তমানে, শুধুমাত্র টেক্সট আকারে উপলব্ধ।
generationConfigobject ( GenerationConfig )ঐচ্ছিক। মডেল তৈরি এবং আউটপুটের জন্য কনফিগারেশন বিকল্পসমূহ।
cachedContentstring ঐচ্ছিক। প্রেডিকশন পরিবেশনের জন্য কনটেক্সট হিসেবে ব্যবহার করার জন্য ক্যাশ করা কন্টেন্টের নাম। ফরম্যাট: cachedContents/{cachedContent}
serviceTierenum ( ServiceTier )ঐচ্ছিক। অনুরোধটির পরিষেবা স্তর।
boolean storeঐচ্ছিক। এটি একটি নির্দিষ্ট অনুরোধের জন্য লগিং আচরণ নির্ধারণ করে। সেট করা হলে, এটি প্রজেক্ট-স্তরের লগিং কনফিগারেশনের চেয়ে অগ্রাধিকার পায়।
উদাহরণ অনুরোধ
পাঠ্য
পাইথন
নোড.জেএস
যান
খোলস
জাভা
ছবি
পাইথন
নোড.জেএস
যান
খোলস
জাভা
অডিও
পাইথন
নোড.জেএস
যান
খোলস
ভিডিও
পাইথন
নোড.জেএস
যান
খোলস
পিডিএফ
পাইথন
যান
খোলস
চ্যাট
পাইথন
নোড.জেএস
যান
খোলস
জাভা
ক্যাশে
পাইথন
নোড.জেএস
যান
টিউনড মডেল
পাইথন
JSON মোড
পাইথন
নোড.জেএস
যান
খোলস
জাভা
কোড এক্সিকিউশন
পাইথন
যান
জাভা
ফাংশন কলিং
পাইথন
যান
নোড.জেএস
খোলস
জাভা
জেনারেশন কনফিগারেশন
পাইথন
নোড.জেএস
যান
খোলস
জাভা
নিরাপত্তা সেটিংস
পাইথন
নোড.জেএস
যান
খোলস
জাভা
সিস্টেম নির্দেশাবলী
পাইথন
নোড.জেএস
যান
খোলস
জাভা
প্রতিক্রিয়া সংস্থা
সফল হলে, রেসপন্স বডিতে GenerateContentResponse এর একটি ইনস্ট্যান্স থাকে।
পদ্ধতি: models.streamGenerateContent
GenerateContentRequest ইনপুটের ভিত্তিতে মডেল থেকে একটি স্ট্রিমড রেসপন্স তৈরি করে।
এন্ডপয়েন্ট
পোস্টhttps: / /generativelanguage.googleapis.com /v1beta /{model=models /*}:streamGenerateContentপথের পরামিতি
modelstring আবশ্যক। সমাপ্তি তৈরির জন্য ব্যবহৃত Model নাম।
ফর্ম্যাট: models/{model} । এটি models/{model} আকারে থাকে।
অনুরোধকারী শরীর
অনুরোধের মূল অংশে নিম্নলিখিত কাঠামোসহ ডেটা থাকে:
tools[]object ( Tool ) ঐচ্ছিক। পরবর্তী প্রতিক্রিয়া তৈরি করতে Model Tools ব্যবহার করতে পারে তার একটি তালিকা।
Tool হলো এক খণ্ড কোড যা সিস্টেমকে বাহ্যিক সিস্টেমের সাথে যোগাযোগ করে Model জ্ঞান ও পরিধির বাইরে কোনো একটি বা একাধিক কাজ সম্পাদন করতে সক্ষম করে। সমর্থিত Tool হলো Function এবং codeExecution । আরও জানতে ফাংশন কলিং এবং কোড এক্সিকিউশন গাইডগুলো দেখুন।
toolConfigobject ( ToolConfig ) ঐচ্ছিক। অনুরোধে উল্লেখিত যেকোনো Tool জন্য টুল কনফিগারেশন। ব্যবহারের উদাহরণের জন্য ফাংশন কলিং গাইড দেখুন।
safetySettings[]object ( SafetySetting ) ঐচ্ছিক। অনিরাপদ কন্টেন্ট ব্লক করার জন্য স্বতন্ত্র SafetySetting ইনস্ট্যান্সগুলোর একটি তালিকা।
এটি GenerateContentRequest.contents এবং GenerateContentResponse.candidates এর উপর প্রয়োগ করা হবে। প্রতিটি SafetyCategory টাইপের জন্য একাধিক সেটিং থাকা উচিত নয়। এই সেটিংগুলো দ্বারা নির্ধারিত থ্রেশহোল্ড পূরণ করতে ব্যর্থ হলে API সেই সমস্ত কন্টেন্ট এবং রেসপন্স ব্লক করে দেবে। এই তালিকাটি safetySettings-এ উল্লেখিত প্রতিটি SafetyCategory জন্য ডিফল্ট সেটিংগুলোকে ওভাররাইড করে। তালিকায় কোনো নির্দিষ্ট SafetyCategory জন্য SafetySetting না থাকলে, API সেই ক্যাটাগরির জন্য ডিফল্ট সেফটি সেটিং ব্যবহার করবে। HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK হার্ম ক্যাটাগরিগুলো সমর্থিত। উপলব্ধ সেফটি সেটিংস সম্পর্কে বিস্তারিত তথ্যের জন্য গাইডটি দেখুন। আপনার এআই অ্যাপ্লিকেশনগুলিতে কীভাবে নিরাপত্তা সংক্রান্ত বিষয়গুলি অন্তর্ভুক্ত করবেন তা জানতে নিরাপত্তা নির্দেশিকাটিও দেখুন।
systemInstructionobject ( Content )ঐচ্ছিক। ডেভেলপার কর্তৃক নির্ধারিত সিস্টেম নির্দেশাবলী । বর্তমানে, শুধুমাত্র টেক্সট আকারে উপলব্ধ।
generationConfigobject ( GenerationConfig )ঐচ্ছিক। মডেল তৈরি এবং আউটপুটের জন্য কনফিগারেশন বিকল্পসমূহ।
cachedContentstring ঐচ্ছিক। প্রেডিকশন পরিবেশনের জন্য কনটেক্সট হিসেবে ব্যবহার করার জন্য ক্যাশ করা কন্টেন্টের নাম। ফরম্যাট: cachedContents/{cachedContent}
serviceTierenum ( ServiceTier )ঐচ্ছিক। অনুরোধটির পরিষেবা স্তর।
boolean storeঐচ্ছিক। এটি একটি নির্দিষ্ট অনুরোধের জন্য লগিং আচরণ নির্ধারণ করে। সেট করা হলে, এটি প্রজেক্ট-স্তরের লগিং কনফিগারেশনের চেয়ে অগ্রাধিকার পায়।
উদাহরণ অনুরোধ
পাঠ্য
পাইথন
নোড.জেএস
যান
খোলস
জাভা
ছবি
পাইথন
নোড.জেএস
যান
খোলস
জাভা
অডিও
পাইথন
যান
খোলস
ভিডিও
পাইথন
নোড.জেএস
যান
খোলস
পিডিএফ
পাইথন
যান
খোলস
চ্যাট
পাইথন
নোড.জেএস
যান
খোলস
প্রতিক্রিয়া সংস্থা
সফল হলে, রেসপন্স বডিতে GenerateContentResponse ইনস্ট্যান্সের একটি ধারা থাকে।
বিষয়বস্তু প্রতিক্রিয়া তৈরি করুন
একাধিক সম্ভাব্য প্রতিক্রিয়া সমর্থনকারী মডেল থেকে প্রাপ্ত প্রতিক্রিয়া।
GenerateContentResponse.prompt_feedback এ উভয় প্রম্পটের জন্য এবং finishReason ও safetyRatings এ প্রতিটি ক্যান্ডিডেটের জন্য সেফটি রেটিং এবং কন্টেন্ট ফিল্টারিং রিপোর্ট করা হয়। এপিআইটি: - অনুরোধ করা সমস্ত ক্যান্ডিডেট অথবা কোনোটিই রিটার্ন করে না - শুধুমাত্র প্রম্পটে কোনো সমস্যা থাকলে কোনো ক্যান্ডিডেটই রিটার্ন করে না ( promptFeedback চেক করুন) - finishReason এবং safetyRatings এ প্রতিটি ক্যান্ডিডেটের উপর ফিডব্যাক রিপোর্ট করে।
candidates[]object ( Candidate )মডেল থেকে প্রাপ্ত সম্ভাব্য উত্তরসমূহ।
promptFeedbackobject ( PromptFeedback )কন্টেন্ট ফিল্টারগুলো সম্পর্কিত প্রম্পটের প্রতিক্রিয়া ফেরত দেয়।
usageMetadataobject ( UsageMetadata )শুধুমাত্র আউটপুট। জেনারেশন অনুরোধগুলোর টোকেন ব্যবহারের মেটাডেটা।
modelVersionstringশুধুমাত্র আউটপুট। প্রতিক্রিয়া তৈরি করতে ব্যবহৃত মডেল সংস্করণ।
responseIdstringশুধুমাত্র আউটপুট। প্রতিটি প্রতিক্রিয়া শনাক্ত করতে responseId ব্যবহার করা হয়।
modelStatusobject ( ModelStatus )শুধুমাত্র আউটপুট। এই মডেলটির বর্তমান অবস্থা।
| JSON উপস্থাপনা |
|---|
{ "candidates": [ { object ( |
প্রম্পটফিডব্যাক
GenerateContentRequest.content এ প্রম্পট দ্বারা নির্দিষ্ট করা ফিডব্যাক মেটাডেটার একটি সেট।
blockReasonenum ( BlockReason )ঐচ্ছিক। এটি সেট করা থাকলে, প্রম্পটটি ব্লক করা হয় এবং কোনো প্রার্থীকে ফেরত দেওয়া হয় না। প্রম্পটটি নতুন করে লিখুন।
safetyRatings[]object ( SafetyRating )প্রম্পটের নিরাপত্তার জন্য রেটিং। প্রতিটি বিভাগে সর্বাধিক একটি রেটিং দেওয়া যাবে।
| JSON উপস্থাপনা |
|---|
{ "blockReason": enum ( |
ব্লকরিজন
প্রম্পটটি ব্লক করার কারণ উল্লেখ করে।
| এনাম | |
|---|---|
BLOCK_REASON_UNSPECIFIED | ডিফল্ট মান। এই মানটি ব্যবহৃত হয় না। |
SAFETY | নিরাপত্তাজনিত কারণে প্রম্পটটি ব্লক করা হয়েছে। কোন নিরাপত্তা বিভাগের কারণে এটি ব্লক করা হয়েছে তা জানতে safetyRatings দেখুন। |
OTHER | অজ্ঞাত কারণে প্রম্পটটি ব্লক করা হয়েছিল। |
BLOCKLIST | পরিভাষা ব্লক তালিকায় অন্তর্ভুক্ত শব্দ থাকার কারণে প্রম্পটটি ব্লক করা হয়েছে। |
PROHIBITED_CONTENT | নিষিদ্ধ বিষয়বস্তুর কারণে প্রম্পটটি ব্লক করা হয়েছে। |
IMAGE_SAFETY | অনিরাপদ ছবি তৈরির কারণে প্রার্থীদের ব্লক করা হয়েছে। |
ব্যবহার মেটাডেটা
জেনারেশন রিকোয়েস্টের টোকেন ব্যবহারের মেটাডেটা।
promptTokenCountinteger প্রম্পটে থাকা টোকেনের সংখ্যা। যখন cachedContent সেট করা থাকে, তখনও এটিই মোট কার্যকর প্রম্পট সাইজ হিসেবে গণ্য হয়, অর্থাৎ এর মধ্যে ক্যাশ করা কন্টেন্টে থাকা টোকেনের সংখ্যাও অন্তর্ভুক্ত থাকে।
cachedContentTokenCountintegerপ্রম্পটের ক্যাশ করা অংশে (ক্যাশ করা বিষয়বস্তু) থাকা টোকেনের সংখ্যা
candidatesTokenCountintegerতৈরি হওয়া সমস্ত সম্ভাব্য উত্তর জুড়ে থাকা টোকেনের মোট সংখ্যা।
toolUsePromptTokenCountintegerশুধুমাত্র আউটপুট। টুল-ব্যবহারের প্রম্পট(গুলি)-তে উপস্থিত টোকেনের সংখ্যা।
thoughtsTokenCountintegerশুধুমাত্র আউটপুট। চিন্তন মডেলগুলোর জন্য চিন্তার টোকেনের সংখ্যা।
totalTokenCountintegerজেনারেশন অনুরোধের জন্য মোট টোকেন সংখ্যা (প্রম্পট + ভাবনা + সম্ভাব্য উত্তর)।
promptTokensDetails[]object ( ModalityTokenCount )শুধুমাত্র আউটপুট। অনুরোধের ইনপুটে প্রক্রিয়াকৃত মোডালিটিগুলোর তালিকা।
cacheTokensDetails[]object ( ModalityTokenCount )শুধুমাত্র আউটপুট। অনুরোধ ইনপুটে থাকা ক্যাশ করা কন্টেন্টের মোডালিটির তালিকা।
candidatesTokensDetails[]object ( ModalityTokenCount )শুধুমাত্র আউটপুট। প্রতিক্রিয়ায় ফেরত আসা মোডালিটিগুলোর তালিকা।
toolUsePromptTokensDetails[]object ( ModalityTokenCount )শুধুমাত্র আউটপুট। টুল-ব্যবহারের অনুরোধের ইনপুটগুলোর জন্য যে মোডালিটিগুলো প্রক্রিয়া করা হয়েছিল, তার তালিকা।
serviceTierenum ( ServiceTier )শুধুমাত্র আউটপুট। অনুরোধটির পরিষেবা স্তর।
| JSON উপস্থাপনা |
|---|
{ "promptTokenCount": integer, "cachedContentTokenCount": integer, "candidatesTokenCount": integer, "toolUsePromptTokenCount": integer, "thoughtsTokenCount": integer, "totalTokenCount": integer, "promptTokensDetails": [ { object ( |
মডেলস্ট্যাটাস
অন্তর্নিহিত মডেলের অবস্থা। এটি অন্তর্নিহিত মডেলের পর্যায় এবং প্রযোজ্য ক্ষেত্রে অবসরের সময় নির্দেশ করতে ব্যবহৃত হয়।
modelStageenum ( ModelStage )অন্তর্নিহিত মডেলের পর্যায়।
retirementTimestring ( Timestamp format)যে সময়ে মডেলটি বন্ধ করে দেওয়া হবে।
RFC 3339 ব্যবহার করা হয়, যেখানে তৈরি হওয়া আউটপুট সর্বদা Z-নরম্যালাইজড হবে এবং এতে ০, ৩, ৬ বা ৯টি ভগ্নাংশীয় অঙ্ক ব্যবহৃত হবে। "Z" ছাড়াও অন্যান্য অফসেটও গ্রহণ করা হয়। উদাহরণ: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" অথবা "2014-10-02T15:01:23+05:30" ।
messagestringমডেলের অবস্থা ব্যাখ্যা করে একটি বার্তা।
| JSON উপস্থাপনা |
|---|
{
"modelStage": enum ( |
মডেলস্টেজ
অন্তর্নিহিত মডেলের পর্যায়কে সংজ্ঞায়িত করে।
| এনাম | |
|---|---|
MODEL_STAGE_UNSPECIFIED | অনির্দিষ্ট মডেল পর্যায়। |
UNSTABLE_EXPERIMENTAL | অন্তর্নিহিত মডেলটিতে অনেক পরিমার্জন করা হয়। |
EXPERIMENTAL | এই পর্যায়ের মডেলগুলো শুধুমাত্র পরীক্ষামূলক উদ্দেশ্যে ব্যবহৃত হবে। |
PREVIEW | এই পর্যায়ের মডেলগুলো পরীক্ষামূলক মডেলগুলোর চেয়ে বেশি পরিপক্ক। |
STABLE | এই পর্যায়ের মডেলগুলোকে স্থিতিশীল এবং উৎপাদনের জন্য প্রস্তুত বলে মনে করা হয়। |
LEGACY | মডেলটি এই পর্যায়ে থাকলে, এর অর্থ হলো অদূর ভবিষ্যতে এই মডেলটি বাতিল হতে চলেছে। শুধুমাত্র বিদ্যমান গ্রাহকরাই এই মডেলটি ব্যবহার করতে পারবেন। |
DEPRECATED | এই পর্যায়ের মডেলগুলো অপ্রচলিত। এই মডেলগুলো ব্যবহার করা যাবে না। |
RETIRED | এই পর্যায়ের মডেলগুলো বাতিল করা হয়েছে। এই মডেলগুলো ব্যবহার করা যাবে না। |
প্রার্থী
- JSON উপস্থাপনা
- ফিনিশরিজন
- গ্রাউন্ডিং অ্যাট্রিবিউশন
- অ্যাট্রিবিউশনসোর্সআইডি
- গ্রাউন্ডিংপ্যাসেজআইডি
- SemanticRetrieverChunk
- গ্রাউন্ডিংমেটাডেটা
- সার্চএন্ট্রি পয়েন্ট
- গ্রাউন্ডিংচাঙ্ক
- ওয়েব
- ছবি
- পুনরুদ্ধারকৃত প্রসঙ্গ
- কাস্টম মেটাডেটা
- স্ট্রিংলিস্ট
- মানচিত্র
- PlaceAnswerSources
- রিভিউস্নিপেট
- গ্রাউন্ডিং সাপোর্ট
- সেগমেন্ট
- পুনরুদ্ধার মেটাডেটা
- লগপ্রবসরেজাল্ট
- শীর্ষ প্রার্থীরা
- প্রার্থী
- ইউআরএলকনটেক্সটমেটাডেটা
- ইউআরএলমেটাডেটা
- ইউআরএল পুনরুদ্ধার স্থিতি
মডেল থেকে তৈরি একটি সম্ভাব্য প্রতিক্রিয়া।
contentobject ( Content )শুধুমাত্র আউটপুট। মডেল থেকে প্রাপ্ত জেনারেটেড কন্টেন্ট।
finishReasonenum ( FinishReason )ঐচ্ছিক। শুধুমাত্র আউটপুট। মডেলটি কেন টোকেন তৈরি করা বন্ধ করে দিয়েছে তার কারণ।
খালি থাকলে, মডেলটি টোকেন তৈরি করা বন্ধ করেনি।
safetyRatings[]object ( SafetyRating )একজন সাড়াদানকারী প্রার্থীর নিরাপত্তার রেটিং-এর তালিকা।
প্রতিটি বিভাগে সর্বাধিক একটি রেটিং থাকতে পারে।
citationMetadataobject ( CitationMetadata )শুধুমাত্র আউটপুট। মডেল-উৎপাদিত ক্যান্ডিডেটের জন্য উদ্ধৃতি তথ্য।
এই ক্ষেত্রটি content অন্তর্ভুক্ত যেকোনো পাঠ্যের আবৃত্তি সংক্রান্ত তথ্য দিয়ে পূরণ করা যেতে পারে। এগুলি হলো সেইসব অংশ যা মৌলিক এলএলএম (LLM) প্রশিক্ষণ ডেটার কপিরাইটযুক্ত উপাদান থেকে "আবৃত্তি" করা হয়।
tokenCountintegerশুধুমাত্র আউটপুট। এই ক্যান্ডিডেটের জন্য টোকেন সংখ্যা।
groundingAttributions[]object ( GroundingAttribution )শুধুমাত্র আউটপুট। একটি সুপ্রতিষ্ঠিত উত্তর প্রদানে অবদান রাখা উৎসগুলোর স্বীকৃতিমূলক তথ্য।
GenerateAnswer কলগুলোর জন্য এই ফিল্ডটি পূরণ করা হয়।
groundingMetadataobject ( GroundingMetadata )শুধুমাত্র আউটপুট। প্রার্থীর জন্য গ্রাউন্ডিং মেটাডেটা।
GenerateContent কলগুলোর জন্য এই ফিল্ডটি পূরণ করা হয়।
avgLogprobsnumberশুধুমাত্র আউটপুট। প্রার্থীর গড় লগ সম্ভাব্যতা স্কোর।
logprobsResultobject ( LogprobsResult )শুধুমাত্র আউটপুট। প্রতিক্রিয়া টোকেন এবং শীর্ষ টোকেনগুলির জন্য লগ-লাইকলিহুড স্কোর।
urlContextMetadataobject ( UrlContextMetadata )শুধুমাত্র আউটপুট। ইউআরএল কনটেক্সট পুনরুদ্ধার টুল সম্পর্কিত মেটাডেটা।
indexintegerশুধুমাত্র আউটপুট। প্রতিক্রিয়া প্রার্থীদের তালিকায় প্রার্থীর সূচক।
finishMessagestring ঐচ্ছিক। শুধুমাত্র আউটপুট। মডেলটি কেন টোকেন তৈরি করা বন্ধ করেছে তার কারণ বিস্তারিতভাবে জানায়। এটি শুধুমাত্র তখনই পূরণ করা হয় যখন finishReason সেট করা থাকে।
| JSON উপস্থাপনা |
|---|
{ "content": { object ( |
ফিনিশরিজন
মডেলটি কেন টোকেন তৈরি করা বন্ধ করে দিয়েছে তার কারণ ব্যাখ্যা করে।
| এনাম | |
|---|---|
FINISH_REASON_UNSPECIFIED | ডিফল্ট মান। এই মানটি ব্যবহৃত হয় না। |
STOP | মডেলটির স্বাভাবিক সমাপ্তি বিন্দু অথবা প্রদত্ত সমাপ্তি ক্রম। |
MAX_TOKENS | অনুরোধে উল্লেখিত সর্বোচ্চ সংখ্যক টোকেন পূর্ণ হয়ে গেছে। |
SAFETY | নিরাপত্তাজনিত কারণে সম্ভাব্য প্রতিক্রিয়া বিষয়বস্তুটি চিহ্নিত করা হয়েছে। |
RECITATION | আবৃত্তির কারণে উত্তরটির সম্ভাব্য বিষয়বস্তু চিহ্নিত করা হয়েছে। |
LANGUAGE | অসমর্থিত ভাষা ব্যবহারের কারণে সম্ভাব্য প্রতিক্রিয়া বিষয়বস্তুটি চিহ্নিত করা হয়েছে। |
OTHER | অজ্ঞাত কারণ। |
BLOCKLIST | বিষয়বস্তুতে নিষিদ্ধ শব্দ থাকায় টোকেন তৈরি করা বন্ধ করা হয়েছে। |
PROHIBITED_CONTENT | সম্ভাব্য নিষিদ্ধ বিষয়বস্তু থাকার কারণে টোকেন তৈরি বন্ধ করা হয়েছে। |
SPII | বিষয়বস্তুটিতে সম্ভাব্য সংবেদনশীল ব্যক্তিগত শনাক্তকরণ তথ্য (SPII) থাকায় টোকেন তৈরি বন্ধ করা হয়েছে। |
MALFORMED_FUNCTION_CALL | মডেল দ্বারা তৈরি ফাংশন কলটি অবৈধ। |
IMAGE_SAFETY | তৈরি করা ছবিগুলোতে নিরাপত্তা লঙ্ঘন থাকায় টোকেন তৈরি বন্ধ করা হয়েছে। |
IMAGE_PROHIBITED_CONTENT | তৈরি করা ছবিগুলোতে অন্যান্য নিষিদ্ধ বিষয়বস্তু থাকায় ছবি তৈরি করা বন্ধ করা হয়েছে। |
IMAGE_OTHER | অন্যান্য বিবিধ সমস্যার কারণে ছবি তৈরি হওয়া বন্ধ হয়ে গেছে। |
NO_IMAGE | মডেলটি থেকে একটি ছবি তৈরি হওয়ার কথা ছিল, কিন্তু কোনো ছবি তৈরি হয়নি। |
IMAGE_RECITATION | আবৃত্তির কারণে চিত্র তৈরি বন্ধ হয়ে গেছে। |
UNEXPECTED_TOOL_CALL | মডেলটি একটি টুল কল তৈরি করেছে কিন্তু অনুরোধে কোনো টুল সক্রিয় করা হয়নি। |
TOO_MANY_TOOL_CALLS | মডেলটি পরপর অনেক বেশি টুল কল করায় সিস্টেমটি বন্ধ হয়ে গেছে। |
MISSING_THOUGHT_SIGNATURE | অনুরোধটিতে অন্তত একটি চিন্তার স্বাক্ষর অনুপস্থিত। |
MALFORMED_RESPONSE | ত্রুটিপূর্ণ প্রতিক্রিয়ার কারণে সমাপ্ত করা হয়েছে। |
ESCALATION | একটি এস্কেলেশন নিয়মের মাধ্যমে অনুরোধটি ফিল্টার করা হয়েছিল। |
গ্রাউন্ডিং অ্যাট্রিবিউশন
উত্তর প্রদানে অবদান রাখা উৎসের স্বীকৃতি।
sourceIdobject ( AttributionSourceId )শুধুমাত্র আউটপুট। এই অ্যাট্রিবিউশনে অবদানকারী উৎসের শনাক্তকারী।
contentobject ( Content )এই অ্যাট্রিবিউশনটি গঠনকারী উৎস বিষয়বস্তুর ভিত্তি স্থাপন।
| JSON উপস্থাপনা |
|---|
{ "sourceId": { object ( |
অ্যাট্রিবিউশনসোর্সআইডি
এই কৃতিত্ব প্রদানে অবদানকারী উৎসের শনাক্তকারী।
sourceUnion typegroundingPassageobject ( GroundingPassageId )ইনলাইন অনুচ্ছেদের শনাক্তকারী।
semanticRetrieverChunkobject ( SemanticRetrieverChunk ) সিমান্টিক রিট্রিভারের মাধ্যমে প্রাপ্ত একটি Chunk শনাক্তকারী।
| JSON উপস্থাপনা |
|---|
{ // source "groundingPassage": { object ( |
গ্রাউন্ডিংপ্যাসেজআইডি
GroundingPassage অন্তর্গত কোনো অংশের শনাক্তকারী।
passageIdstring শুধুমাত্র আউটপুট। GenerateAnswerRequest এর GroundingPassage.id সাথে মিলে যাওয়া প্যাসেজটির আইডি।
partIndexinteger শুধুমাত্র আউটপুট। GenerateAnswerRequest এর GroundingPassage.content এর অন্তর্গত অংশটির সূচী।
| JSON উপস্থাপনা |
|---|
{ "passageId": string, "partIndex": integer } |
SemanticRetrieverChunk
SemanticRetrieverConfig ব্যবহার করে GenerateAnswerRequest এ নির্দিষ্ট করা Semantic Retriever-এর মাধ্যমে পুনরুদ্ধার করা একটি Chunk এর শনাক্তকারী।
sourcestring শুধুমাত্র আউটপুট। অনুরোধের SemanticRetrieverConfig.source এর সাথে মেলে এমন উৎসের নাম। উদাহরণ: corpora/123 অথবা corpora/123/documents/abc
chunkstring শুধুমাত্র আউটপুট। অ্যাট্রিবিউটেড টেক্সট ধারণকারী Chunk নাম। উদাহরণ: corpora/123/documents/abc/chunks/xyz
| JSON উপস্থাপনা |
|---|
{ "source": string, "chunk": string } |
গ্রাউন্ডিংমেটাডেটা
গ্রাউন্ডিং সক্রিয় করা হলে মেটাডেটা ক্লায়েন্টকে ফেরত পাঠানো হয়।
groundingChunks[]object ( GroundingChunk )নির্দিষ্ট গ্রাউন্ডিং উৎস থেকে প্রাপ্ত সহায়ক রেফারেন্সের তালিকা। স্ট্রিমিং করার সময়, এতে কেবল সেই গ্রাউন্ডিং চাঙ্কগুলো থাকে যেগুলো পূর্ববর্তী রেসপন্সগুলোর গ্রাউন্ডিং মেটাডেটাতে অন্তর্ভুক্ত করা হয়নি।
groundingSupports[]object ( GroundingSupport )গ্রাউন্ডিং সাপোর্টের তালিকা।
webSearchQueries[]stringপরবর্তী ওয়েব অনুসন্ধানের জন্য ওয়েব অনুসন্ধান প্রশ্নাবলী।
imageSearchQueries[]stringগ্রাউন্ডিংয়ের জন্য ব্যবহৃত ইমেজ সার্চ কোয়েরি।
searchEntryPointobject ( SearchEntryPoint )ঐচ্ছিক। পরবর্তী ওয়েব অনুসন্ধানের জন্য গুগল সার্চ এন্ট্রি।
retrievalMetadataobject ( RetrievalMetadata )গ্রাউন্ডিং ফ্লোতে পুনরুদ্ধার সম্পর্কিত মেটাডেটা।
googleMapsWidgetContextTokenstringঐচ্ছিক। গুগল ম্যাপস উইজেট কনটেক্সট টোকেনের রিসোর্স নাম, যা প্রাসঙ্গিক ডেটা রেন্ডার করার জন্য PlacesContextElement উইজেটের সাথে ব্যবহার করা যেতে পারে। শুধুমাত্র গুগল ম্যাপসের সাথে গ্রাউন্ডিং সক্রিয় করা থাকলেই এটি পূরণ করা হয়।
| JSON উপস্থাপনা |
|---|
{ "groundingChunks": [ { object ( |
সার্চএন্ট্রি পয়েন্ট
গুগল অনুসন্ধানের প্রবেশপথ।
renderedContentstringঐচ্ছিক। ওয়েব কন্টেন্ট স্নিপেট যা একটি ওয়েব পেজ বা অ্যাপ ওয়েবভিউতে এমবেড করা যায়।
sdkBlobstring ( bytes format)ঐচ্ছিক। <সার্চ টার্ম, সার্চ ইউআরএল> টাপলের অ্যারে উপস্থাপনকারী Base64 এনকোডেড JSON।
একটি বেস৬৪-এনকোডেড স্ট্রিং।
| JSON উপস্থাপনা |
|---|
{ "renderedContent": string, "sdkBlob": string } |
গ্রাউন্ডিংচাঙ্ক
একটি GroundingChunk হলো সহায়ক প্রমাণের এমন একটি অংশ যা মডেলের প্রতিক্রিয়াকে ভিত্তি দেয়। এটি ওয়েব থেকে নেওয়া কোনো অংশ, কোনো ফাইল থেকে সংগৃহীত প্রাসঙ্গিক তথ্য, বা গুগল ম্যাপস থেকে প্রাপ্ত তথ্য হতে পারে।
chunk_typeUnion typewebobject ( Web )ওয়েব থেকে খণ্ডাংশ গ্রাউন্ডিং করা হচ্ছে।
imageobject ( Image )ঐচ্ছিক। ইমেজ সার্চ থেকে গ্রাউন্ডিং চাঙ্ক।
retrievedContextobject ( RetrievedContext )ঐচ্ছিক। ফাইল সার্চ টুল দ্বারা প্রাপ্ত কনটেক্সট থেকে চাঙ্ক গ্রাউন্ডিং করা।
mapsobject ( Maps )ঐচ্ছিক। গুগল ম্যাপস থেকে গ্রাউন্ডিং চাঙ্ক।
| JSON উপস্থাপনা |
|---|
{ // chunk_type "web": { object ( |
ওয়েব
ওয়েব থেকে নেওয়া অংশ।
uristringশুধুমাত্র আউটপুট। চাঙ্কটির URI রেফারেন্স।
titlestringশুধুমাত্র আউটপুট। ডেটা খণ্ডের শিরোনাম।
| JSON উপস্থাপনা |
|---|
{ "uri": string, "title": string } |
ছবি
ইমেজ সার্চ থেকে প্রাপ্ত অংশ।
sourceUristringকৃতিত্ব প্রদানের জন্য ওয়েব পেজের ইউআরআই।
imageUristringইমেজ অ্যাসেট ইউআরএল।
titlestringযে ওয়েব পেজটি থেকে ছবিটি নেওয়া হয়েছে, তার শিরোনাম।
domainstringযে ওয়েব পেজটি থেকে ছবিটি নেওয়া হয়েছে, তার রুট ডোমেইন, যেমন 'example.com'।
| JSON উপস্থাপনা |
|---|
{ "sourceUri": string, "imageUri": string, "title": string, "domain": string } |
পুনরুদ্ধারকৃত প্রসঙ্গ
ফাইল সার্চ টুল দ্বারা প্রাপ্ত কনটেক্সটের অংশবিশেষ।
customMetadata[]object ( CustomMetadata )ঐচ্ছিক। সংগৃহীত কনটেক্সট সম্পর্কিত ব্যবহারকারী-প্রদত্ত মেটাডেটা।
uristringঐচ্ছিক। শব্দার্থগত পুনরুদ্ধার নথির URI রেফারেন্স।
titlestringঐচ্ছিক। নথির শিরোনাম।
textstringঐচ্ছিক। অংশবিশেষের পাঠ্য।
fileSearchStorestring ঐচ্ছিক। যে FileSearchStore ডকুমেন্টটি রয়েছে তার নাম। উদাহরণ: fileSearchStores/123
pageNumberintegerঐচ্ছিক। প্রাপ্ত কনটেক্সটের পৃষ্ঠা নম্বর, যদি প্রযোজ্য হয়।
mediaIdstringঐচ্ছিক। মাল্টিমোডাল ফাইল অনুসন্ধানের ফলাফলের জন্য মিডিয়া ব্লব রিসোর্সের নাম। ফরম্যাট: fileSearchStores/{file_search_store_id}/media/{blobId}
| JSON উপস্থাপনা |
|---|
{
"customMetadata": [
{
object ( |
কাস্টম মেটাডেটা
ব্যবহারকারী গ্রাউন্ডিংফ্যাক্ট সম্পর্কে মেটাডেটা প্রদান করেছেন।
keystringমেটাডেটার চাবি।
valueUnion typestringValuestringঐচ্ছিক। মেটাডেটার স্ট্রিং মান।
stringListValueobject ( StringList )ঐচ্ছিক। মেটাডেটার জন্য স্ট্রিং মানগুলির একটি তালিকা।
numericValuenumber ঐচ্ছিক। মেটাডেটার সাংখ্যিক মান। এই মানের প্রত্যাশিত পরিসীমা ব্যবহৃত নির্দিষ্ট key উপর নির্ভর করে।
| JSON উপস্থাপনা |
|---|
{
"key": string,
// value
"stringValue": string,
"stringListValue": {
object ( |
স্ট্রিংলিস্ট
স্ট্রিং মানগুলির একটি তালিকা।
values[]stringতালিকার স্ট্রিং মানগুলো।
| JSON উপস্থাপনা |
|---|
{ "values": [ string ] } |
মানচিত্র
গুগল ম্যাপসের একটি গ্রাউন্ডিং চাঙ্ক। একটি ম্যাপস চাঙ্ক একটি একক স্থানকে নির্দেশ করে।
uristringস্থানটির URI রেফারেন্স।
titlestringস্থানটির নাম।
textstringস্থানটির উত্তরের পাঠ্য বিবরণ।
placeIdstring স্থানটির আইডি, যা places/{placeId} ফরম্যাটে থাকে। একজন ব্যবহারকারী এই আইডি ব্যবহার করে সেই স্থানটি খুঁজে বের করতে পারেন।
placeAnswerSourcesobject ( PlaceAnswerSources )গুগল ম্যাপসে কোনো নির্দিষ্ট স্থানের বৈশিষ্ট্য সম্পর্কে উত্তর প্রদানকারী উৎসসমূহ।
| JSON উপস্থাপনা |
|---|
{
"uri": string,
"title": string,
"text": string,
"placeId": string,
"placeAnswerSources": {
object ( |
PlaceAnswerSources
গুগল ম্যাপসের কোনো নির্দিষ্ট স্থানের বৈশিষ্ট্য সম্পর্কে উত্তর প্রদানকারী উৎসসমূহের একটি সংগ্রহ। প্রতিটি PlaceAnswerSources বার্তা গুগল ম্যাপসের একটি নির্দিষ্ট স্থানের সাথে সম্পর্কিত। গুগল ম্যাপস টুলটি সেই স্থানের বৈশিষ্ট্য সম্পর্কিত প্রশ্নের উত্তর দেওয়ার জন্য এই উৎসগুলো ব্যবহার করে (যেমন: "বার ফু-তে কি ওয়াইফাই আছে?" অথবা "ফু বার কি হুইলচেয়ার ব্যবহারকারীদের জন্য প্রবেশযোগ্য?")। বর্তমানে আমরা উৎস হিসেবে শুধুমাত্র রিভিউ স্নিপেট সমর্থন করি।
reviewSnippets[]object ( ReviewSnippet )গুগল ম্যাপসে কোনো নির্দিষ্ট স্থানের বৈশিষ্ট্য সম্পর্কে উত্তর তৈরি করতে ব্যবহৃত পর্যালোচনার অংশবিশেষ।
| JSON উপস্থাপনা |
|---|
{
"reviewSnippets": [
{
object ( |
রিভিউস্নিপেট
গুগল ম্যাপসের কোনো নির্দিষ্ট স্থানের বৈশিষ্ট্য সম্পর্কে একটি প্রশ্নের উত্তর দেয় এমন ব্যবহারকারী পর্যালোচনার একটি অংশ এখানে তুলে ধরা হয়েছে।
reviewIdstringরিভিউ স্নিপেটটির আইডি।
googleMapsUristringগুগল ম্যাপস-এ ব্যবহারকারীর পর্যালোচনার সাথে সম্পর্কিত একটি লিঙ্ক।
titlestringপর্যালোচনার শিরোনাম।
| JSON উপস্থাপনা |
|---|
{ "reviewId": string, "googleMapsUri": string, "title": string } |
গ্রাউন্ডিং সাপোর্ট
গ্রাউন্ডিং সাপোর্ট।
groundingChunkIndices[]integer ঐচ্ছিক। দাবির সাথে সম্পর্কিত উদ্ধৃতিগুলি নির্দিষ্ট করে এমন সূচকগুলির একটি তালিকা ( response.candidate.grounding_metadata এর 'grounding_chunk'-এ)। উদাহরণস্বরূপ, [1,3,4] এর অর্থ হল grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] হল দাবির জন্য নির্ধারিত পুনরুদ্ধার করা বিষয়বস্তু। যদি প্রতিক্রিয়াটি স্ট্রিমিং হয়, তাহলে groundingChunkIndices সমস্ত প্রতিক্রিয়া জুড়ে সূচকগুলিকে নির্দেশ করে। সমস্ত প্রতিক্রিয়া থেকে গ্রাউন্ডিং চাঙ্কগুলি (একই ক্রম বজায় রেখে) একত্রিত করা ক্লায়েন্টের দায়িত্ব।
confidenceScores[]numberঐচ্ছিক। সাপোর্ট রেফারেন্সগুলোর নির্ভরযোগ্যতার স্কোর। এর সীমা ০ থেকে ১। ১ হলো সর্বোচ্চ নির্ভরযোগ্য। এই তালিকার আকার অবশ্যই groundingChunkIndices-এর সমান হতে হবে।
renderedParts[]integer শুধুমাত্র আউটপুট। ক্যান্ডিডেটের কন্টেন্টের parts ফিল্ডের ইনডেক্সসমূহ। এই ইনডেক্সগুলো নির্দিষ্ট করে দেয় যে কোন রেন্ডার করা পার্টগুলো এই সাপোর্ট সোর্সের সাথে যুক্ত।
segmentobject ( Segment )বিষয়বস্তুর যে অংশের সাথে এই সমর্থনটি সম্পর্কিত।
| JSON উপস্থাপনা |
|---|
{
"groundingChunkIndices": [
integer
],
"confidenceScores": [
number
],
"renderedParts": [
integer
],
"segment": {
object ( |
সেগমেন্ট
বিষয়বস্তুর অংশ।
partIndexintegerকোনো প্যারেন্ট Content অবজেক্টের মধ্যে থাকা Part অবজেক্টের ইন্ডেক্স।
startIndexintegerপ্রদত্ত পার্টের প্রারম্ভিক সূচক, যা বাইটে পরিমাপ করা হয়। পার্টের শুরু থেকে অফসেট, যা শূন্য থেকে শুরু হয় এবং শূন্য সহ গণনা করা হয়।
endIndexintegerপ্রদত্ত পার্টের শেষ সূচক, যা বাইটে পরিমাপ করা হয়। পার্টের শুরু থেকে অফসেট, যা শূন্য থেকে শুরু হয় এবং এতে কোনো বাইটের প্রয়োজন হয় না।
textstringপ্রতিক্রিয়া থেকে প্রাপ্ত অংশটির সাথে সম্পর্কিত পাঠ্য।
| JSON উপস্থাপনা |
|---|
{ "partIndex": integer, "startIndex": integer, "endIndex": integer, "text": string } |
পুনরুদ্ধার মেটাডেটা
গ্রাউন্ডিং ফ্লোতে পুনরুদ্ধার সম্পর্কিত মেটাডেটা।
googleSearchDynamicRetrievalScorenumberঐচ্ছিক। এই স্কোরটি নির্দেশ করে যে, গুগল সার্চ থেকে প্রাপ্ত তথ্য প্রশ্নটির উত্তর দিতে কতটা সাহায্য করতে পারে। স্কোরটির পরিসর [0, 1], যেখানে 0 হলো সর্বনিম্ন সম্ভাবনা এবং 1 হলো সর্বোচ্চ সম্ভাবনা। এই স্কোরটি শুধুমাত্র তখনই প্রদর্শিত হয় যখন গুগল সার্চ গ্রাউন্ডিং এবং ডাইনামিক রিট্রিভাল সক্রিয় থাকে। গুগল সার্চ চালু করা হবে কিনা তা নির্ধারণ করতে এটিকে থ্রেশহোল্ডের সাথে তুলনা করা হবে।
| JSON উপস্থাপনা |
|---|
{ "googleSearchDynamicRetrievalScore": number } |
লগপ্রবসরেজাল্ট
লগপ্রবস ফলাফল
topCandidates[]object ( TopCandidates )দৈর্ঘ্য = ডিকোডিং ধাপের মোট সংখ্যা।
chosenCandidates[]object ( Candidate )দৈর্ঘ্য = ডিকোডিং ধাপের মোট সংখ্যা। নির্বাচিত প্রার্থীরা শীর্ষ প্রার্থীদের তালিকায় থাকতেও পারেন, আবার নাও থাকতে পারেন।
logProbabilitySumnumberসমস্ত টোকেনের লগ সম্ভাবনার যোগফল।
| JSON উপস্থাপনা |
|---|
{ "topCandidates": [ { object ( |
শীর্ষ প্রার্থীরা
প্রতিটি ডিকোডিং ধাপে সর্বোচ্চ লগ সম্ভাবনাসম্পন্ন প্রার্থীগণ।
candidates[]object ( Candidate )লগ সম্ভাব্যতা অনুসারে অবরোহী ক্রমে সাজানো।
| JSON উপস্থাপনা |
|---|
{
"candidates": [
{
object ( |
প্রার্থী
logprobs টোকেন এবং স্কোরের জন্য প্রার্থী।
tokenstringপ্রার্থীর টোকেন স্ট্রিং মান।
tokenIdintegerপ্রার্থীর টোকেন আইডি মান।
logProbabilitynumberপ্রার্থীর লগ সম্ভাবনা।
| JSON উপস্থাপনা |
|---|
{ "token": string, "tokenId": integer, "logProbability": number } |
ইউআরএলকনটেক্সটমেটাডেটা
ইউআরএল কনটেক্সট পুনরুদ্ধার টুল সম্পর্কিত মেটাডেটা।
urlMetadata[]object ( UrlMetadata )ইউআরএল কনটেক্সটের তালিকা।
| JSON উপস্থাপনা |
|---|
{
"urlMetadata": [
{
object ( |
ইউআরএলমেটাডেটা
একটিমাত্র ইউআরএল পুনরুদ্ধারের প্রেক্ষাপট।
retrievedUrlstringটুলটির মাধ্যমে ইউআরএলটি সংগ্রহ করা হয়েছে।
urlRetrievalStatusenum ( UrlRetrievalStatus )ইউআরএল পুনরুদ্ধারের অবস্থা।
| JSON উপস্থাপনা |
|---|
{
"retrievedUrl": string,
"urlRetrievalStatus": enum ( |
ইউআরএল পুনরুদ্ধার স্থিতি
ইউআরএল পুনরুদ্ধারের অবস্থা।
| এনাম | |
|---|---|
URL_RETRIEVAL_STATUS_UNSPECIFIED | ডিফল্ট মান। এই মানটি ব্যবহৃত হয় না। |
URL_RETRIEVAL_STATUS_SUCCESS | ইউআরএল পুনরুদ্ধার সফল হয়েছে। |
URL_RETRIEVAL_STATUS_ERROR | ত্রুটির কারণে ইউআরএল পুনরুদ্ধার করা সম্ভব হয়নি। |
URL_RETRIEVAL_STATUS_PAYWALL | কন্টেন্টটি পেওয়ালের আড়ালে থাকায় ইউআরএল পুনরুদ্ধার করা সম্ভব হয়নি। |
URL_RETRIEVAL_STATUS_UNSAFE | বিষয়বস্তু অনিরাপদ হওয়ায় ইউআরএল পুনরুদ্ধার করা সম্ভব হয়নি। |
উদ্ধৃতি মেটাডেটা
কোনো একটি বিষয়বস্তুর উৎস উল্লেখসমূহের সংকলন।
citationSources[]object ( CitationSource )একটি নির্দিষ্ট উত্তরের জন্য উৎসের উদ্ধৃতি।
| JSON উপস্থাপনা |
|---|
{
"citationSources": [
{
object ( |
উদ্ধৃতি উৎস
কোনো নির্দিষ্ট উত্তরের অংশের উৎসের উদ্ধৃতি।
startIndexintegerঐচ্ছিক। প্রতিক্রিয়ার যে অংশটি এই উৎসের বলে গণ্য করা হবে, তার শুরু।
ইনডেক্স সেগমেন্টের শুরু নির্দেশ করে, যা বাইটে পরিমাপ করা হয়।
endIndexintegerঐচ্ছিক। আরোপিত অংশের শেষ, স্বতন্ত্র।
uristringঐচ্ছিক। URI যা পাঠ্যের কোনো অংশের উৎস হিসেবে ব্যবহৃত হয়।
licensestringঐচ্ছিক। সেগমেন্টের উৎস হিসেবে ব্যবহৃত গিটহাব প্রজেক্টের লাইসেন্স।
কোড উদ্ধৃতির জন্য লাইসেন্সের তথ্য প্রয়োজন।
| JSON উপস্থাপনা |
|---|
{ "startIndex": integer, "endIndex": integer, "uri": string, "license": string } |
ক্ষতি বিভাগ
রেটিং-এর শ্রেণীবিভাগ।
এই বিভাগগুলো বিভিন্ন ধরনের ক্ষতিকে অন্তর্ভুক্ত করে, যা ডেভেলপাররা সমন্বয় করতে চাইতে পারেন।
| এনাম | |
|---|---|
HARM_CATEGORY_UNSPECIFIED | বিভাগটি অনির্দিষ্ট। |
HARM_CATEGORY_DEROGATORY | PaLM - পরিচয় এবং/অথবা সুরক্ষিত বৈশিষ্ট্যকে লক্ষ্য করে করা নেতিবাচক বা ক্ষতিকর মন্তব্য। |
HARM_CATEGORY_TOXICITY | PaLM - অভদ্র, অসম্মানজনক বা অশ্লীল বিষয়বস্তু। |
HARM_CATEGORY_VIOLENCE | PaLM - কোনো ব্যক্তি বা গোষ্ঠীর বিরুদ্ধে সহিংসতা চিত্রিত করে এমন পরিস্থিতি, অথবা বীভৎসতার সাধারণ বর্ণনা বোঝায়। |
HARM_CATEGORY_SEXUAL | PaLM - এতে যৌন কার্যকলাপ বা অন্যান্য অশ্লীল বিষয়বস্তুর উল্লেখ রয়েছে। |
HARM_CATEGORY_MEDICAL | PaLM - যাচাইবিহীন চিকিৎসা পরামর্শকে উৎসাহিত করে। |
HARM_CATEGORY_DANGEROUS | PaLM - বিপজ্জনক বিষয়বস্তু যা ক্ষতিকর কাজকে উৎসাহিত করে, সহায়তা করে বা প্ররোচিত করে। |
HARM_CATEGORY_HARASSMENT | মিথুন - হয়রানিমূলক বিষয়বস্তু। |
HARM_CATEGORY_HATE_SPEECH | মিথুন - বিদ্বেষমূলক বক্তব্য ও বিষয়বস্তু। |
HARM_CATEGORY_SEXUALLY_EXPLICIT | মিথুন - যৌনতাপূর্ণ বিষয়বস্তু। |
HARM_CATEGORY_DANGEROUS_CONTENT | মিথুন - বিপজ্জনক বিষয়বস্তু। |
HARM_CATEGORY_CIVIC_INTEGRITY | মিথুন রাশি - এমন বিষয়বস্তু যা নাগরিক অখণ্ডতার ক্ষতি করতে ব্যবহার করা হতে পারে। বাতিল: এর পরিবর্তে enableEnhancedCivicAnswers ব্যবহার করুন। |
HARM_CATEGORY_JAILBREAK | মিথুন - মডেলের নিরাপত্তা নির্দেশিকা এড়িয়ে যাওয়ার বা লঙ্ঘন করার প্রচেষ্টা (জেলব্রেকের চেষ্টা)। |
ModalityTokenCount
একটিমাত্র মোডালিটির জন্য টোকেন গণনার তথ্য উপস্থাপন করে।
modalityenum ( Modality )এই টোকেন সংখ্যার সাথে সংশ্লিষ্ট পদ্ধতি।
tokenCountintegerটোকেনের সংখ্যা।
| JSON উপস্থাপনা |
|---|
{
"modality": enum ( |
পদ্ধতি
বিষয়বস্তু অংশ পদ্ধতি
| এনাম | |
|---|---|
MODALITY_UNSPECIFIED | অনির্দিষ্ট পদ্ধতি। |
TEXT | সাধারণ লেখা। |
IMAGE | ছবি। |
VIDEO | ভিডিও। |
AUDIO | অডিও। |
DOCUMENT | নথি, যেমন পিডিএফ। |
নিরাপত্তা রেটিং
কোনো একটি কন্টেন্টের নিরাপত্তা রেটিং।
নিরাপত্তা রেটিং-এ কোনো একটি কন্টেন্টের জন্য ক্ষতির বিভাগ এবং সেই বিভাগে ক্ষতির সম্ভাবনার মাত্রা অন্তর্ভুক্ত থাকে। কন্টেন্টকে বিভিন্ন ক্ষতির বিভাগের ভিত্তিতে নিরাপত্তার জন্য শ্রেণিবদ্ধ করা হয় এবং ক্ষতির শ্রেণিবিভাগের সম্ভাবনাও এখানে অন্তর্ভুক্ত থাকে।
categoryenum ( HarmCategory )আবশ্যক। এই রেটিংয়ের জন্য বিভাগ।
probabilityenum ( HarmProbability )প্রয়োজনীয়। এই বিষয়বস্তুর জন্য ক্ষতির সম্ভাবনা।
blockedbooleanএই রেটিংটির কারণে কি এই কন্টেন্টটি ব্লক করা হয়েছিল?
| JSON উপস্থাপনা |
|---|
{ "category": enum ( |
ক্ষতির সম্ভাবনা
কোনো একটি বিষয়বস্তু ক্ষতিকর হওয়ার সম্ভাবনা।
শ্রেণিবিন্যাস পদ্ধতিটি কোনো বিষয়বস্তু অনিরাপদ হওয়ার সম্ভাবনা নির্দেশ করে। এটি কোনো বিষয়বস্তুর ক্ষতির তীব্রতা নির্দেশ করে না।
| এনাম | |
|---|---|
HARM_PROBABILITY_UNSPECIFIED | সম্ভাবনা অনির্দিষ্ট। |
NEGLIGIBLE | বিষয়বস্তু অনিরাপদ হওয়ার সম্ভাবনা নগণ্য। |
LOW | বিষয়বস্তু অনিরাপদ হওয়ার সম্ভাবনা কম। |
MEDIUM | বিষয়বস্তুটি অনিরাপদ হওয়ার মাঝারি সম্ভাবনা রয়েছে। |
HIGH | বিষয়বস্তুটি অনিরাপদ হওয়ার প্রবল সম্ভাবনা রয়েছে। |
নিরাপত্তা সেটিং
নিরাপত্তা সেটিং, যা নিরাপত্তা-অবরোধকারী আচরণকে প্রভাবিত করে।
কোনো ক্যাটাগরির জন্য সুরক্ষা সেটিং সেট করলে, কন্টেন্ট ব্লক হওয়ার অনুমোদিত সম্ভাবনা পরিবর্তিত হয়।
categoryenum ( HarmCategory )আবশ্যক। এই সেটিংয়ের জন্য বিভাগ।
thresholdenum ( HarmBlockThreshold )প্রয়োজনীয়। যে সম্ভাব্যতা সীমায় ক্ষতি প্রতিরোধ করা হয়, তা নিয়ন্ত্রণ করে।
| JSON উপস্থাপনা |
|---|
{ "category": enum ( |
ক্ষতি প্রতিরোধের সীমা
একটি নির্দিষ্ট ক্ষতির সম্ভাবনার পর্যায়ে এবং তার পরেও বাধা সৃষ্টি করুন।
| এনাম | |
|---|---|
HARM_BLOCK_THRESHOLD_UNSPECIFIED | থ্রেশহোল্ড অনির্দিষ্ট। |
BLOCK_LOW_AND_ABOVE | নগণ্য বিষয়বস্তু অনুমোদিত হবে। |
BLOCK_MEDIUM_AND_ABOVE | নগণ্য এবং নিম্ন মানের বিষয়বস্তু অনুমোদিত হবে। |
BLOCK_ONLY_HIGH | নগণ্য, নিম্ন এবং মাঝারি মানের বিষয়বস্তু অনুমোদিত হবে। |
BLOCK_NONE | সকল বিষয়বস্তু অনুমোদিত হবে। |
OFF | সুরক্ষা ফিল্টারটি বন্ধ করুন। |
সার্ভিসটিয়ার
অনুরোধের পরিষেবা স্তর।
| এনাম | |
|---|---|
unspecified | ডিফল্ট পরিষেবা স্তর, যা প্রমিত। |
standard | সাধারণ পরিষেবা স্তর। |
flex | নমনীয় পরিষেবা স্তর। |
priority | অগ্রাধিকার পরিষেবা স্তর। |
বিষয়বস্তু
- JSON উপস্থাপনা
- অংশ
- ব্লব
- ফাংশনকল
- ফাংশন প্রতিক্রিয়া
- ফাংশন প্রতিক্রিয়া অংশ
- ফাংশনরেসপন্সব্লব
- সময়সূচী
- ফাইলডেটা
- এক্সিকিউটেবলকোড
- ভাষা
- কোড এক্সিকিউশন রেজাল্ট
- ফলাফল
- টুলকল
- টুলটাইপ
- টুলরেসপন্স
- ভিডিওমেটাডেটা
- মিডিয়ারেজোলিউশন
- স্তর
- মিডিয়া প্রসেসিং
একটি বার্তার বহু-অংশবিশিষ্ট বিষয়বস্তু ধারণকারী মূল কাঠামোগত ডেটাটাইপ।
একটি Content একটি role ' ফিল্ড থাকে যা Content প্রযোজককে নির্দেশ করে এবং একটি ' parts ' ফিল্ড থাকে, যাতে বহু-অংশবিশিষ্ট ডেটা থাকে যা মেসেজ টার্নের বিষয়বস্তু ধারণ করে।
parts[]object ( Part ) ক্রমবিন্যস্ত Parts যা একটি একক বার্তা গঠন করে। অংশগুলোর ভিন্ন ভিন্ন MIME টাইপ থাকতে পারে।
rolestringঐচ্ছিক। বিষয়বস্তুর প্রযোজক। অবশ্যই 'ব্যবহারকারী' অথবা 'মডেল' হতে হবে।
একাধিক পালায় কথোপকথনের জন্য এটি সেট করা সুবিধাজনক, অন্যথায় এটি খালি বা সেট না করেও রাখা যেতে পারে।
| JSON উপস্থাপনা |
|---|
{
"parts": [
{
object ( |
অংশ
একটি ডেটাটাইপ যা একটি বহু-অংশবিশিষ্ট Content মেসেজের অংশ এমন মিডিয়া ধারণ করে।
একটি Part এমন ডেটা নিয়ে গঠিত যার একটি সংশ্লিষ্ট ডেটাটাইপ থাকে। একটি Part Part.data তে থাকা স্বীকৃত টাইপগুলোর মধ্যে শুধুমাত্র একটিই থাকতে পারে।
যদি inlineData ফিল্ডটি র' বাইট দিয়ে পূরণ করা হয়, তাহলে একটি Part অবশ্যই একটি নির্দিষ্ট IANA MIME টাইপ থাকতে হবে যা মিডিয়ার টাইপ এবং সাবটাইপ শনাক্ত করে।
thoughtbooleanঐচ্ছিক। অংশটি মডেল থেকে ভাবা হয়েছে কিনা তা নির্দেশ করে।
thoughtSignaturestring ( bytes format)ঐচ্ছিক। ভাবনার জন্য একটি অস্বচ্ছ স্বাক্ষর, যাতে এটি পরবর্তী অনুরোধগুলিতে পুনরায় ব্যবহার করা যায়।
একটি বেস৬৪-এনকোডেড স্ট্রিং।
partMetadataobject ( Struct format)পার্টটির সাথে যুক্ত কাস্টম মেটাডেটা। যে এজেন্টরা কন্টেন্ট রিপ্রেজেন্টেশন হিসেবে genai.Part ব্যবহার করেন, তাদের এই অতিরিক্ত তথ্যগুলোর হিসাব রাখার প্রয়োজন হতে পারে। উদাহরণস্বরূপ, এটি হতে পারে সেই ফাইল/সোর্সের নাম যেখান থেকে পার্টটি তৈরি হয়েছে, অথবা একাধিক পার্ট স্ট্রিমকে মাল্টিপ্লেক্স করার কোনো উপায়।
mediaResolutionobject ( MediaResolution )ঐচ্ছিক। ইনপুট মিডিয়ার জন্য মিডিয়া রেজোলিউশন।
mediaProcessingenum ( MediaProcessing ) ঐচ্ছিক। মডেলটি বোঝার জন্য এই অংশের মিডিয়াকে কীভাবে প্রক্রিয়াজাত করে। শুধুমাত্র ভিডিও অংশের ( inlineData অথবা ভিডিও মাইম সহ fileData ) জন্য এটি অর্থবহ। ভিডিও নয় এমন অংশ এই ক্ষেত্রটি উপেক্ষা করে।
dataUnion typetextstringইনলাইন টেক্সট।
inlineDataobject ( Blob )ইনলাইন মিডিয়া বাইট।
functionCallobject ( FunctionCall ) মডেল থেকে ফেরত আসা একটি পূর্বাভাসিত FunctionCall , যাতে FunctionDeclaration.name এর প্রতিনিধিত্বকারী একটি স্ট্রিং-এর সাথে আর্গুমেন্ট এবং তাদের মানগুলো থাকে।
functionResponseobject ( FunctionResponse ) একটি FunctionCall এর ফলাফল আউটপুট, যাতে FunctionDeclaration.name কে প্রতিনিধিত্বকারী একটি স্ট্রিং এবং ফাংশন থেকে প্রাপ্ত যেকোনো আউটপুট ধারণকারী একটি স্ট্রাকচার্ড JSON অবজেক্ট থাকে, তা মডেলের কনটেক্সট হিসেবে ব্যবহৃত হয়।
fileDataobject ( FileData )URI ভিত্তিক ডেটা।
executableCodeobject ( ExecutableCode )মডেল দ্বারা তৈরি কোড যা কার্যকর করার জন্য নির্ধারিত।
codeExecutionResultobject ( CodeExecutionResult ) ExecutableCode কার্যকর করার ফলাফল।
toolCallobject ( ToolCall )সার্ভার-সাইড টুল কল। যখন মডেল এমন কোনো টুল আহ্বানের পূর্বাভাস দেয় যা সার্ভারে চালানো উচিত, তখন এই ফিল্ডটি পূরণ করা হয়। ক্লায়েন্টের কাছ থেকে এই বার্তাটি এপিআই-তে ফেরত পাঠানোর কথা।
toolResponseobject ( ToolResponse ) সার্ভার-সাইড ToolCall নির্বাহের আউটপুট। এই ফিল্ডটি ক্লায়েন্ট দ্বারা সংশ্লিষ্ট ToolCall নির্বাহের ফলাফল দিয়ে পূরণ করা হয়।
metadataUnion typevideoMetadataobject ( VideoMetadata )ঐচ্ছিক। ভিডিও মেটাডেটা। মেটাডেটা শুধুমাত্র তখনই উল্লেখ করা উচিত যখন ভিডিও ডেটা inlineData বা fileData-তে উপস্থাপন করা হয়।
| JSON উপস্থাপনা |
|---|
{ "thought": boolean, "thoughtSignature": string, "partMetadata": { object }, "mediaResolution": { object ( |
ব্লব
কাঁচা মিডিয়া বাইট।
টেক্সট সরাসরি বাইট হিসেবে পাঠানো উচিত নয়, 'টেক্সট' ফিল্ডটি ব্যবহার করুন।
mimeTypestringউৎস ডেটার IANA স্ট্যান্ডার্ড MIME টাইপ। সমর্থিত প্রকারের উদাহরণ: - ছবি: image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/gif, image/avif - অডিও: audio/*, video/audio/s16le, video/audio/wav - ভিডিও: video/* - টেক্সট: text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, video/text/timestamp - অ্যাপ্লিকেশন: application/x-javascript, application/x-typescript, application/x-python-code, application/json, application/x-ipynb+json, application/rtf, application/pdf অতিরিক্ত তথ্যের জন্য, সমর্থিত ফাইল ফরম্যাট দেখুন। //
datastring ( bytes format)মিডিয়া ফরম্যাটের জন্য কাঁচা বাইট।
একটি বেস৬৪-এনকোডেড স্ট্রিং।
| JSON উপস্থাপনা |
|---|
{ "mimeType": string, "data": string } |
ফাংশনকল
মডেল থেকে ফেরত আসা একটি পূর্বাভাসিত FunctionCall , যাতে FunctionDeclaration.name এর প্রতিনিধিত্বকারী একটি স্ট্রিং-এর সাথে আর্গুমেন্ট এবং তাদের মানগুলো থাকে।
idstring ঐচ্ছিক। ফাংশন কলের অনন্য শনাক্তকারী। এটি পূরণ করা হলে, ক্লায়েন্ট functionCall কার্যকর করবে এবং মিলে যাওয়া id সহ প্রতিক্রিয়াটি ফেরত দেবে।
namestringআবশ্যক। যে ফাংশনটি কল করতে হবে তার নাম। এটি অবশ্যই az, AZ, 0-9 হতে হবে অথবা এতে আন্ডারস্কোর এবং ড্যাশ থাকতে হবে, এবং এর সর্বোচ্চ দৈর্ঘ্য ১২৮।
argsobject ( Struct format)ঐচ্ছিক। ফাংশনের প্যারামিটার এবং মানগুলো JSON অবজেক্ট ফরম্যাটে থাকবে।
| JSON উপস্থাপনা |
|---|
{ "id": string, "name": string, "args": { object } } |
ফাংশন প্রতিক্রিয়া
একটি FunctionCall থেকে প্রাপ্ত ফলাফল, যাতে FunctionDeclaration.name কে প্রতিনিধিত্বকারী একটি স্ট্রিং এবং ফাংশনের যেকোনো আউটপুট ধারণকারী একটি স্ট্রাকচার্ড JSON অবজেক্ট থাকে, তা মডেলের কনটেক্সট হিসেবে ব্যবহৃত হয়। এতে মডেলের পূর্বাভাসের উপর ভিত্তি করে করা একটি FunctionCall এর ফলাফল থাকা উচিত।
idstring Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call id .
namestringRequired. The name of the function to call. Must be az, AZ, 0-9, or contain underscores and dashes, with a maximum length of 128.
responseobject ( Struct format)Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, eg "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model.
Multimedia can be included by using a subobject containing a single "$ref" key whose value is the inlineData.display_name of a FunctionResponsePart holding the multimedia. See https://ai.google.dev/gemini-api/docs/function-calling#multimodal .
parts[]object ( FunctionResponsePart ) Optional. Ordered Parts that constitute a function response. Parts may have different IANA MIME types.
willContinueboolean Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty response with willContinue=False to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set scheduling to SILENT .
schedulingenum ( Scheduling )Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.
| JSON উপস্থাপনা |
|---|
{ "id": string, "name": string, "response": { object }, "parts": [ { object ( |
FunctionResponsePart
A datatype containing media that is part of a FunctionResponse message.
A FunctionResponsePart consists of data which has an associated datatype. A FunctionResponsePart can only contain one of the accepted types in FunctionResponsePart.data .
A FunctionResponsePart must have a fixed IANA MIME type identifying the type and subtype of the media if the inlineData field is filled with raw bytes.
dataUnion typeinlineDataobject ( FunctionResponseBlob )Inline media bytes.
| JSON উপস্থাপনা |
|---|
{
// data
"inlineData": {
object ( |
FunctionResponseBlob
Raw media bytes for function response.
Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.
mimeTypestringThe IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see Supported file formats .
datastring ( bytes format)Raw bytes for media formats.
A base64-encoded string.
| JSON উপস্থাপনা |
|---|
{ "mimeType": string, "data": string } |
সময়সূচী
Specifies how the response should be scheduled in the conversation.
| এনাম | |
|---|---|
SCHEDULING_UNSPECIFIED | এই মানটি অব্যবহৃত। |
SILENT | Only add the result to the conversation context, do not interrupt or trigger generation. |
WHEN_IDLE | Add the result to the conversation context, and prompt to generate output without interrupting ongoing generation. |
INTERRUPT | Add the result to the conversation context, interrupt ongoing generation and prompt to generate output. |
FileData
URI based data.
mimeTypestringOptional. The IANA standard MIME type of the source data.
fileUristringRequired. URI.
| JSON উপস্থাপনা |
|---|
{ "mimeType": string, "fileUri": string } |
ExecutableCode
Code generated by the model that is meant to be executed, and the result returned to the model.
Only generated when using the CodeExecution tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated.
idstring Optional. Unique identifier of the ExecutableCode part. The server returns the CodeExecutionResult with the matching id .
languageenum ( Language ) Required. Programming language of the code .
codestringRequired. The code to be executed.
| JSON উপস্থাপনা |
|---|
{
"id": string,
"language": enum ( |
ভাষা
Supported programming languages for the generated code.
| এনাম | |
|---|---|
LANGUAGE_UNSPECIFIED | Unspecified language. This value should not be used. |
PYTHON | Python >= 3.10, with numpy and simpy available. Python is the default language. |
CodeExecutionResult
Result of executing the ExecutableCode .
Generated only when the CodeExecution tool is used.
idstring Optional. The identifier of the ExecutableCode part this result is for. Only populated if the corresponding ExecutableCode has an id.
outcomeenum ( Outcome )Required. Outcome of the code execution.
outputstringOptional. Contains stdout when code execution is successful, stderr or other description otherwise.
| JSON উপস্থাপনা |
|---|
{
"id": string,
"outcome": enum ( |
Outcome
Enumeration of possible outcomes of the code execution.
| এনাম | |
|---|---|
OUTCOME_UNSPECIFIED | Unspecified status. This value should not be used. |
OUTCOME_OK | Code execution completed successfully. output contains the stdout, if any. |
OUTCOME_FAILED | Code execution failed. output contains the stderr and stdout, if any. |
OUTCOME_DEADLINE_EXCEEDED | Code execution ran for too long, and was cancelled. There may or may not be a partial output present. |
ToolCall
A predicted server-side ToolCall returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this ToolCall . Instead, the client should pass this ToolCall back to the API in a subsequent turn within a Content message, along with the corresponding ToolResponse .
idstring Optional. Unique identifier of the tool call. The server returns the tool response with the matching id .
toolNamestringOptional. The name of the tool that was called.
toolTypeenum ( ToolType )Required. The type of tool that was called.
argsobject ( Struct format)Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...}
| JSON উপস্থাপনা |
|---|
{
"id": string,
"toolName": string,
"toolType": enum ( |
ToolType
The type of tool in the function call.
| এনাম | |
|---|---|
TOOL_TYPE_UNSPECIFIED | Unspecified tool type. |
GOOGLE_SEARCH_WEB | Google search tool, maps to Tool.google_search.search_types.web_search. |
GOOGLE_SEARCH_IMAGE | Image search tool, maps to Tool.google_search.search_types.image_search. |
URL_CONTEXT | URL context tool, maps to Tool.url_context. |
GOOGLE_MAPS | Google maps tool, maps to Tool.google_maps. |
FILE_SEARCH | File search tool, maps to Tool.file_search. |
ToolResponse
The output from a server-side ToolCall execution. This message contains the results of a tool invocation that was initiated by a ToolCall from the model. The client should pass this ToolResponse back to the API in a subsequent turn within a Content message, along with the corresponding ToolCall .
idstringOptional. The identifier of the tool call this response is for.
toolTypeenum ( ToolType ) Required. The type of tool that was called, matching the toolType in the corresponding ToolCall .
responseobject ( Struct format)Optional. The tool response.
| JSON উপস্থাপনা |
|---|
{
"id": string,
"toolType": enum ( |
VideoMetadata
Deprecated: Use GenerateContentRequest.processing_options instead. Metadata describes the input video content.
startOffsetstring ( Duration format)Optional. The start offset of the video.
A duration in seconds with up to nine fractional digits, ending with ' s '. Example: "3.5s" .
endOffsetstring ( Duration format)Optional. The end offset of the video.
A duration in seconds with up to nine fractional digits, ending with ' s '. Example: "3.5s" .
fpsnumberOptional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].
| JSON উপস্থাপনা |
|---|
{ "startOffset": string, "endOffset": string, "fps": number } |
মিডিয়ারেজোলিউশন
Media resolution for tokenization.
valueUnion typelevelenum ( Level ) The tokenization quality used for given media.
| JSON উপস্থাপনা |
|---|
{
// value
"level": enum ( |
স্তর
The media resolution level.
| এনাম | |
|---|---|
MEDIA_RESOLUTION_UNSPECIFIED | Media resolution has not been set. |
MEDIA_RESOLUTION_LOW | Media resolution set to low. |
MEDIA_RESOLUTION_MEDIUM | Media resolution set to medium. |
MEDIA_RESOLUTION_HIGH | Media resolution set to high. |
MEDIA_RESOLUTION_ULTRA_HIGH | Media resolution set to ultra high. |
MediaProcessing
How the model processes input media for understanding.
| এনাম | |
|---|---|
MEDIA_PROCESSING_UNSPECIFIED | Defaults to model-specific processing. |
STATIC | Fixed-rate frame extraction. All frames placed in context. |
AGENTIC | Model-driven dynamic navigation. Recommended for most use cases. |
পরিবেশ
An execution environment for an agent.
idstringRequired. Output only. The ID of the environment.
sources[]object ( Source )Sources to be mounted into the environment.
createdstringOutput only. The time at which the environment was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
updatedstringOutput only. The time at which the environment was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
lastAccessedstringOutput only. The time at which the environment was last accessed in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).
statusenum ( Status )Output only. The status of the environment container.
fileCountstring ( int64 format)Output only. The number of files in the environment, output only.
sizeBytesstring ( int64 format)Output only. The total size of the environment files in bytes, output only.
networkUnion typenetworkAllowlistobject ( EnvironmentNetworkEgressAllowlist )Allow only specific domains.
networkModeenum ( NetworkMode )Network egress mode.
| JSON উপস্থাপনা |
|---|
{ "id": string, "sources": [ { object ( |
অবস্থা
Status of the environment.
| এনাম | |
|---|---|
STATUS_UNSPECIFIED | |
ACTIVE | |
EXPIRED | |
NetworkMode
Network egress mode for non-allowlist configurations.
| এনাম | |
|---|---|
NETWORK_MODE_UNSPECIFIED | Default value. Unused. |
DISABLED | All network egress is blocked. |
স্কিমা
The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object .
typeenum ( Type )Required. Data type.
formatstringOptional. The format of the data. Any value is allowed, but most do not trigger any special functionality.
titlestringOptional. The title of the schema.
descriptionstringOptional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown.
nullablebooleanOptional. Indicates if the value may be null.
enum[]stringOptional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
maxItemsstring ( int64 format)Optional. Maximum number of the elements for Type.ARRAY.
minItemsstring ( int64 format)Optional. Minimum number of the elements for Type.ARRAY.
propertiesmap (key: string, value: object ( Schema ))Optional. Properties of Type.OBJECT.
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
required[]stringOptional. Required properties of Type.OBJECT.
minPropertiesstring ( int64 format)Optional. Minimum number of the properties for Type.OBJECT.
maxPropertiesstring ( int64 format)Optional. Maximum number of the properties for Type.OBJECT.
minLengthstring ( int64 format)Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING
maxLengthstring ( int64 format)Optional. Maximum length of the Type.STRING
patternstringOptional. Pattern of the Type.STRING to restrict a string to a regular expression.
examplevalue ( Value format)Optional. Example of the object. Will only populated when the object is the root.
anyOf[]object ( Schema )Optional. The value should be validated against any (one or more) of the subschemas in the list.
propertyOrdering[]stringOptional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response.
defaultvalue ( Value format) Optional. Default value of the field. Per JSON Schema, this field is intended for documentation generators and doesn't affect validation. Thus it's included here and ignored so that developers who send schemas with a default field don't get unknown-field errors.
itemsobject ( Schema )Optional. Schema of the elements of Type.ARRAY.
minimumnumberOptional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER
maximumnumberOptional. Maximum value of the Type.INTEGER and Type.NUMBER
| JSON উপস্থাপনা |
|---|
{ "type": enum ( |
প্রকার
Type contains the list of OpenAPI data types as defined by https://spec.openapis.org/oas/v3.0.3#data-types
| এনাম | |
|---|---|
TYPE_UNSPECIFIED | Not specified, should not be used. |
STRING | String type. |
NUMBER | Number type. |
INTEGER | Integer type. |
BOOLEAN | Boolean type. |
ARRAY | Array type. |
OBJECT | Object type. |
NULL | Null type. |
সরঞ্জাম
- JSON উপস্থাপনা
- FunctionDeclaration
- আচরণ
- GoogleSearchRetrieval
- DynamicRetrievalConfig
- মোড
- কোডএক্সিকিউশন
- গুগল অনুসন্ধান
- ব্যবধান
- SearchTypes
- WebSearch
- ImageSearch
- ComputerUse
- পরিবেশ
- SafetyPolicy
- ইউআরএলপ্রসঙ্গ
- ফাইলসার্চ
- McpServer
- StreamableHttpTransport
- গুগলম্যাপস
Tool details that the model may use to generate response.
Tool হলো এক খণ্ড কোড যা সিস্টেমকে বাহ্যিক সিস্টেমের সাথে যোগাযোগ করে এমন কোনো কাজ বা একাধিক কাজ সম্পাদন করতে সক্ষম করে, যা মডেলের জ্ঞান ও পরিধির বাইরে থাকে।
functionDeclarations[]object ( FunctionDeclaration ) Optional. A list of FunctionDeclarations available to the model that can be used for function calling.
The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role "function" generation context for the next model turn.
googleSearchRetrievalobject ( GoogleSearchRetrieval )Optional. Retrieval tool that is powered by Google search.
codeExecutionobject ( CodeExecution )Optional. Enables the model to execute code as part of generation.
googleSearchobject ( GoogleSearch )Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
computerUseobject ( ComputerUse )Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations.
urlContextobject ( UrlContext )Optional. Tool to support URL context retrieval.
fileSearchobject ( FileSearch )Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora.
mcpServers[]object ( McpServer )Optional. MCP Servers to connect to.
googleMapsobject ( GoogleMaps )Optional. Tool that allows grounding the model's response with geospatial context related to the user's query.
| JSON উপস্থাপনা |
|---|
{ "functionDeclarations": [ { object ( |
FunctionDeclaration
Structured representation of a function declaration as defined by the OpenAPI 3.03 specification . Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.
namestringRequired. The name of the function. Must be az, AZ, 0-9, or contain underscores, colons, dots, and dashes, with a maximum length of 128.
descriptionstringRequired. A brief description of the function.
behaviorenum ( Behavior )Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method.
parametersobject ( Schema )Optional. Describes the parameters to this function. Reflects the Open API 3.03 Parameter Object string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter.
parametersJsonSchemavalue ( Value format)Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example:
{
"type": "object",
"properties": {
"name": { "type": "string" },
"age": { "type": "integer" }
},
"additionalProperties": false,
"required": ["name", "age"],
"propertyOrdering": ["name", "age"]
}
This field is mutually exclusive with parameters .
responseobject ( Schema )Optional. Describes the output from this function in JSON Schema format. Reflects the Open API 3.03 Response Object. The Schema defines the type used for the response value of the function.
responseJsonSchemavalue ( Value format)Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function.
This field is mutually exclusive with response .
আচরণ
Defines the function behavior. Defaults to BLOCKING .
| এনাম | |
|---|---|
UNSPECIFIED | এই মানটি অব্যবহৃত। |
BLOCKING | If set, the system will wait to receive the function response before continuing the conversation. |
NON_BLOCKING | If set, the system will not wait to receive the function response. Instead, it will attempt to handle function responses as they become available while maintaining the conversation between the user and the model. |
GoogleSearchRetrieval
Tool to retrieve public web data for grounding, powered by Google.
dynamicRetrievalConfigobject ( DynamicRetrievalConfig )Specifies the dynamic retrieval configuration for the given source.
| JSON উপস্থাপনা |
|---|
{
"dynamicRetrievalConfig": {
object ( |
DynamicRetrievalConfig
Describes the options to customize dynamic retrieval.
modeenum ( Mode )The mode of the predictor to be used in dynamic retrieval.
dynamicThresholdnumberThe threshold to be used in dynamic retrieval. If not set, a system default value is used.
| JSON উপস্থাপনা |
|---|
{
"mode": enum ( |
মোড
The mode of the predictor to be used in dynamic retrieval.
| এনাম | |
|---|---|
MODE_UNSPECIFIED | Always trigger retrieval. |
MODE_DYNAMIC | Run retrieval only when system decides it is necessary. |
কোডএক্সিকিউশন
এই প্রকারে কোনো ক্ষেত্র নেই।
Tool that executes code generated by the model, and automatically returns the result to the model.
See also ExecutableCode and CodeExecutionResult which are only generated when using this tool.
গুগল অনুসন্ধান
GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
timeRangeFilterobject ( Interval )Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa).
searchTypesobject ( SearchTypes )Optional. The set of search types to enable. If not set, web search is enabled by default.
| JSON উপস্থাপনা |
|---|
{ "timeRangeFilter": { object ( |
ব্যবধান
Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).
The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.
startTimestring ( Timestamp format)Optional. Inclusive start of the interval.
If specified, a Timestamp matching this interval will have to be the same or after the start.
RFC 3339 ব্যবহার করা হয়, যেখানে তৈরি হওয়া আউটপুট সর্বদা Z-নরম্যালাইজড হবে এবং এতে ০, ৩, ৬ বা ৯টি ভগ্নাংশীয় অঙ্ক ব্যবহৃত হবে। "Z" ছাড়াও অন্যান্য অফসেটও গ্রহণ করা হয়। উদাহরণ: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" অথবা "2014-10-02T15:01:23+05:30" ।
endTimestring ( Timestamp format)Optional. Exclusive end of the interval.
If specified, a Timestamp matching this interval will have to be before the end.
RFC 3339 ব্যবহার করা হয়, যেখানে তৈরি হওয়া আউটপুট সর্বদা Z-নরম্যালাইজড হবে এবং এতে ০, ৩, ৬ বা ৯টি ভগ্নাংশীয় অঙ্ক ব্যবহৃত হবে। "Z" ছাড়াও অন্যান্য অফসেটও গ্রহণ করা হয়। উদাহরণ: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" অথবা "2014-10-02T15:01:23+05:30" ।
| JSON উপস্থাপনা |
|---|
{ "startTime": string, "endTime": string } |
SearchTypes
Different types of search that can be enabled on the GoogleSearch tool.
webSearchobject ( WebSearch )Optional. Enables web search. Only text results are returned.
imageSearchobject ( ImageSearch )Optional. Enables image search. Image bytes are returned.
| JSON উপস্থাপনা |
|---|
{ "webSearch": { object ( |
WebSearch
এই প্রকারে কোনো ক্ষেত্র নেই।
Standard web search for grounding and related configurations.
ImageSearch
এই প্রকারে কোনো ক্ষেত্র নেই।
Image search for grounding and related configurations.
ComputerUse
Computer Use tool type.
environmentenum ( Environment )Required. The environment being operated.
excludedPredefinedFunctions[]stringOptional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions.
enablePromptInjectionDetectionbooleanOptional. Whether enable the prompt injection detection check on computer-use request.
disabledSafetyPolicies[]enum ( SafetyPolicy )Optional. Disabled safety policies for computer use.
| JSON উপস্থাপনা |
|---|
{ "environment": enum ( |
পরিবেশ
Represents the environment being operated, such as a web browser.
| এনাম | |
|---|---|
ENVIRONMENT_UNSPECIFIED | Defaults to browser. |
ENVIRONMENT_BROWSER | Operates in a web browser. |
ENVIRONMENT_MOBILE | Operates in a mobile environment. |
ENVIRONMENT_DESKTOP | Operates in a desktop environment. |
SafetyPolicy
Predefined safety policies for computer use.
| এনাম | |
|---|---|
SAFETY_POLICY_UNSPECIFIED | Unspecified safety policy. |
FINANCIAL_TRANSACTIONS | Safety policy for financial transactions. |
SENSITIVE_DATA_MODIFICATION | Safety policy for sensitive data modification. |
COMMUNICATION_TOOL | Safety policy for communication tools (eg Gmail, Chat, Meet). |
ACCOUNT_CREATION | Safety policy for account creation. |
DATA_MODIFICATION | Safety policy for data modification. |
USER_CONSENT_MANAGEMENT | Safety policy for user consent management. |
LEGAL_TERMS_AND_AGREEMENTS | Safety policy for legal terms and agreements. |
ইউআরএলপ্রসঙ্গ
এই প্রকারে কোনো ক্ষেত্র নেই।
Tool to support URL context retrieval.
ফাইলসার্চ
The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.
fileSearchStoreNames[]string Required. The names of the fileSearchStores to retrieve from. Example: fileSearchStores/my-file-search-store-123
metadataFilterstringOptional. Metadata filter to apply to the semantic retrieval documents and chunks.
topKintegerOptional. The number of semantic retrieval chunks to retrieve.
| JSON উপস্থাপনা |
|---|
{ "fileSearchStoreNames": [ string ], "metadataFilter": string, "topK": integer } |
McpServer
A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol.
namestringMCPServer-টির নাম।
transportUnion typestreamableHttpTransportobject ( StreamableHttpTransport )A transport that can stream HTTP requests and responses.
| JSON উপস্থাপনা |
|---|
{
"name": string,
// transport
"streamableHttpTransport": {
object ( |
StreamableHttpTransport
A transport that can stream HTTP requests and responses.
urlstringMCPServer এন্ডপয়েন্টের সম্পূর্ণ URL। উদাহরণ: "https://api.example.com/mcp"
headersmap (key: string, value: string)ঐচ্ছিক: প্রয়োজন হলে অথেনটিকেশন হেডার, টাইমআউট ইত্যাদির জন্য ফিল্ড।
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
timeoutstring ( Duration format)HTTP timeout for regular operations.
A duration in seconds with up to nine fractional digits, ending with ' s '. Example: "3.5s" .
sseReadTimeoutstring ( Duration format)Timeout for SSE read operations.
A duration in seconds with up to nine fractional digits, ending with ' s '. Example: "3.5s" .
terminateOnClosebooleanWhether to close the client session when the transport closes.
| JSON উপস্থাপনা |
|---|
{ "url": string, "headers": { string: string, ... }, "timeout": string, "sseReadTimeout": string, "terminateOnClose": boolean } |
গুগলম্যাপস
The GoogleMaps Tool that provides geospatial context for the user's query.
enableWidgetbooleanOptional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response.
| JSON উপস্থাপনা |
|---|
{ "enableWidget": boolean } |
REST Resource: auth_tokens
- Resource: AuthToken
- BidiGenerateContentSetup
- GenerationConfig
- পদ্ধতি
- SpeechConfig
- VoiceConfig
- PrebuiltVoiceConfig
- MultiSpeakerVoiceConfig
- SpeakerVoiceConfig
- ThinkingConfig
- ThinkingLevel
- ImageConfig
- মিডিয়ারেজোলিউশন
- ResponseFormatConfig
- TextResponseFormat
- মাইমটাইপ
- AudioResponseFormat
- মাইমটাইপ
- ডেলিভারি
- ImageResponseFormat
- মাইমটাইপ
- ডেলিভারি
- AspectRatio
- ImageSize
- অনুবাদ কনফিগারেশন
- অডিও ট্রান্সক্রিপশন কনফিগারেশন
- LanguageAuto
- LanguageHints
- মোড
- রিয়েলটাইমইনপুটকনফিগ
- স্বয়ংক্রিয় কার্যকলাপ সনাক্তকরণ
- স্টার্টসেনসিটিভিটি
- EndSensitive
- কার্যকলাপ পরিচালনা
- টার্ন কভারেজ
- সেশনরিজাম্পশনকনফিগ
- ContextWindowCompressionConfig
- স্লাইডিং উইন্ডো
- হিস্টোরিকনফিগ
- পদ্ধতি
Resource: AuthToken
একটি ক্ষণস্থায়ী প্রমাণীকরণ টোকেন তৈরি করার অনুরোধ।
namestringশুধুমাত্র আউটপুট। শনাক্তকারী। টোকেনটি নিজে।
expireTimestring ( Timestamp format)ঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। একটি ঐচ্ছিক সময়, যার পরে প্রাপ্ত টোকেনটি ব্যবহার করার সময় BidiGenerateContent সেশনের বার্তাগুলি প্রত্যাখ্যান করা হবে। (এই সময়ের পরে Gemini আগেভাগেই সেশনটি বন্ধ করে দিতে পারে।)
সেট করা না থাকলে, এটি স্বয়ংক্রিয়ভাবে ৩০ মিনিট ভবিষ্যতের সময় দেখাবে। সেট করা থাকলে, এই মানটি অবশ্যই ২০ ঘণ্টার কম ভবিষ্যতের হতে হবে।
RFC 3339 ব্যবহার করা হয়, যেখানে তৈরি হওয়া আউটপুট সর্বদা Z-নরম্যালাইজড হবে এবং এতে ০, ৩, ৬ বা ৯টি ভগ্নাংশীয় অঙ্ক ব্যবহৃত হবে। "Z" ছাড়াও অন্যান্য অফসেটও গ্রহণ করা হয়। উদাহরণ: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" অথবা "2014-10-02T15:01:23+05:30" ।
newSessionExpireTimestring ( Timestamp format)ঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। যে সময়ের পর এই অনুরোধের ফলে প্রাপ্ত টোকেন ব্যবহার করে নতুন লাইভ এপিআই সেশনগুলো প্রত্যাখ্যান করা হবে।
সেট করা না থাকলে এটি স্বয়ংক্রিয়ভাবে ভবিষ্যতের ৬০ সেকেন্ড সময় নেয়। সেট করা থাকলে, এই মানটি অবশ্যই ভবিষ্যতের ২০ ঘণ্টার কম হতে হবে।
RFC 3339 ব্যবহার করা হয়, যেখানে তৈরি হওয়া আউটপুট সর্বদা Z-নরম্যালাইজড হবে এবং এতে ০, ৩, ৬ বা ৯টি ভগ্নাংশীয় অঙ্ক ব্যবহৃত হবে। "Z" ছাড়াও অন্যান্য অফসেটও গ্রহণ করা হয়। উদাহরণ: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" অথবা "2014-10-02T15:01:23+05:30" ।
fieldMaskstring ( FieldMask format) Optional. Input only. Immutable. If fieldMask is empty, and bidiGenerateContentSetup is not present, then the effective BidiGenerateContentSetup message is taken from the Live API connection.
If fieldMask is empty, and bidiGenerateContentSetup is present, then the effective BidiGenerateContentSetup message is taken entirely from bidiGenerateContentSetup in this request. The setup message from the Live API connection is ignored.
If fieldMask is not empty, then the corresponding fields from bidiGenerateContentSetup will overwrite the fields from the setup message in the Live API connection.
This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo" .
configUnion typebidiGenerateContentSetupobject ( BidiGenerateContentSetup ) ঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। BidiGenerateContent জন্য নির্দিষ্ট কনফিগারেশন।
usesintegerঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। টোকেনটি কতবার ব্যবহার করা যাবে। এই মান শূন্য হলে কোনো সীমা প্রযোজ্য হবে না। একটি লাইভ এপিআই সেশন পুনরায় শুরু করা ব্যবহার হিসাবে গণ্য হবে না। অনির্দিষ্ট থাকলে, ডিফল্ট মান হবে ১।
| JSON উপস্থাপনা |
|---|
{
"name": string,
"expireTime": string,
"newSessionExpireTime": string,
"fieldMask": string,
// config
"bidiGenerateContentSetup": {
object ( |
BidiGenerateContentSetup
এই বার্তাটি প্রথম (এবং শুধুমাত্র প্রথম) BidiGenerateContentClientMessage এ পাঠানো হবে। এতে এমন কনফিগারেশন রয়েছে যা স্ট্রিমিং RPC চলাকালীন প্রযোজ্য থাকবে।
অতিরিক্ত কোনো বার্তা পাঠানোর আগে ক্লায়েন্টদের BidiGenerateContentSetupComplete বার্তাটির জন্য অপেক্ষা করা উচিত।
modelstringআবশ্যক। মডেলের রিসোর্স নাম। এটি মডেলের ব্যবহারের জন্য একটি আইডি হিসেবে কাজ করে।
ফরম্যাট: models/{model}
generationConfigobject ( GenerationConfig )ঐচ্ছিক। জেনারেশন কনফিগারেশন।
নিম্নলিখিত ক্ষেত্রগুলি সমর্থিত নয়:
-
responseLogprobs -
responseMimeType -
logprobs -
responseSchema -
responseJsonSchema -
stop_sequence -
skipResponseCache -
routing_config -
audio_timestamp
systemInstructionobject ( Content )ঐচ্ছিক। ব্যবহারকারী মডেলটির জন্য সিস্টেম নির্দেশাবলী প্রদান করেছেন।
দ্রষ্টব্য: শুধুমাত্র লেখা খণ্ড খণ্ড করে ব্যবহার করা হবে এবং প্রতিটি খণ্ডের বিষয়বস্তু একটি পৃথক অনুচ্ছেদে থাকবে।
tools[]object ( Tool ) ঐচ্ছিক। পরবর্তী প্রতিক্রিয়া তৈরি করতে মডেলটি Tools ব্যবহার করতে পারে তার একটি তালিকা।
Tool হলো এক খণ্ড কোড যা সিস্টেমকে বাহ্যিক সিস্টেমের সাথে যোগাযোগ করে এমন কোনো কাজ বা একাধিক কাজ সম্পাদন করতে সক্ষম করে, যা মডেলের জ্ঞান ও পরিধির বাইরে থাকে।
realtimeInputConfigobject ( RealtimeInputConfig )ঐচ্ছিক। রিয়েলটাইম ইনপুট পরিচালনার পদ্ধতি নির্ধারণ করে।
sessionResumptionobject ( SessionResumptionConfig )ঐচ্ছিক। সেশন পুনরায় চালু করার পদ্ধতি নির্ধারণ করে।
অন্তর্ভুক্ত করা হলে, সার্ভার SessionResumptionUpdate বার্তা পাঠাবে।
contextWindowCompressionobject ( ContextWindowCompressionConfig )ঐচ্ছিক। একটি কনটেক্সট উইন্ডো কম্প্রেশন মেকানিজম কনফিগার করে।
অন্তর্ভুক্ত করা হলে, কনটেক্সটের আকার কনফিগার করা দৈর্ঘ্য অতিক্রম করলে সার্ভার স্বয়ংক্রিয়ভাবে তা কমিয়ে দেবে।
inputAudioTranscriptionobject ( AudioTranscriptionConfig )ঐচ্ছিক। সেট করা থাকলে, ভয়েস ইনপুটের ট্রান্সক্রিপশন চালু হয়। কনফিগার করা থাকলে, ট্রান্সক্রিপশনটি ইনপুট অডিও ভাষার সাথে সামঞ্জস্যপূর্ণ হয়।
outputAudioTranscriptionobject ( AudioTranscriptionConfig )ঐচ্ছিক। সেট করা থাকলে, মডেলের অডিও আউটপুটের ট্রান্সক্রিপশন চালু হয়। কনফিগার করা থাকলে, ট্রান্সক্রিপশনটি আউটপুট অডিওর জন্য নির্দিষ্ট করা ভাষা কোডের সাথে সামঞ্জস্যপূর্ণ হয়।
historyConfigobject ( HistoryConfig )ঐচ্ছিক। ক্লায়েন্ট এবং সার্ভারের মধ্যে হিস্ট্রি আদান-প্রদান কনফিগার করে।
| JSON উপস্থাপনা |
|---|
{ "model": string, "generationConfig": { object ( |
GenerationConfig
Configuration options for model generation and outputs. Not all parameters are configurable for every model.
stopSequences[]string Optional. The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop_sequence . The stop sequence will not be included as part of the response.
responseMimeTypestring Optional. MIME type of the generated candidate text. Supported MIME types are: text/plain : (default) Text output. application/json : JSON response in the response candidates. text/x.enum : ENUM as a string response in the response candidates. Refer to the docs for a list of all supported text MIME types.
responseSchema
(deprecated)object ( Schema )Optional. Output schema of the generated candidate text. Schemas must be a subset of the OpenAPI schema and can be objects, primitives or arrays.
If set, a compatible responseMimeType must also be set. Compatible MIME types: application/json : Schema for JSON response. Refer to the JSON text generation guide for more details.
_responseJsonSchema
(deprecated)value ( Value format) Optional. Output schema of the generated response. This is an alternative to responseSchema that accepts JSON Schema .
If set, responseSchema must be omitted, but responseMimeType is required.
While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported:
-
$id -
$defs -
$ref -
$anchor -
type -
format -
title -
description -
enum(for strings and numbers) -
items -
prefixItems -
minItems -
maxItems -
minimum -
maximum -
anyOf -
oneOf(interpreted the same asanyOf) -
properties -
additionalProperties -
required
The non-standard propertyOrdering property may also be set.
Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If $ref is set on a sub-schema, no other properties, except for than those starting as a $ , may be set.
responseJsonSchemavalue ( Value format) Optional. An internal detail. Use responseJsonSchema rather than this field.
responseModalities[]enum ( Modality )Optional. The requested modalities of the response. Represents the set of modalities that the model can return, and should be expected in the response. This is an exact match to the modalities of the response.
A model may have multiple combinations of supported modalities. If the requested modalities do not match any of the supported combinations, an error will be returned.
An empty list is equivalent to requesting only text.
candidateCountintegerOptional. Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family)
maxOutputTokensintegerOptional. The maximum number of tokens to include in a response candidate.
Note: The default value varies by model, see the Model.output_token_limit attribute of the Model returned from the getModel function.
temperaturenumberOptional. Controls the randomness of the output.
Note: The default value varies by model, see the Model.temperature attribute of the Model returned from the getModel function.
Values can range from [0.0, 2.0].
topPnumberOptional. The maximum cumulative probability of tokens to consider when sampling.
The model uses combined Top-k and Top-p (nucleus) sampling.
Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits the number of tokens based on the cumulative probability.
Note: The default value varies by Model and is specified by the Model.top_p attribute returned from the getModel function. An empty topK attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting topK on requests.
topKintegerOptional. The maximum number of tokens to consider when sampling.
Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of topK most probable tokens. Models running with nucleus sampling don't allow topK setting.
Note: The default value varies by Model and is specified by the Model.top_p attribute returned from the getModel function. An empty topK attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting topK on requests.
seedintegerOptional. Seed used in decoding. If not set, the request uses a randomly generated seed.
presencePenaltynumberOptional. Presence penalty applied to the next token's logprobs if the token has already been seen in the response.
This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequencyPenalty for a penalty that increases with each use.
A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary.
A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary.
frequencyPenaltynumberOptional. Frequency penalty applied to the next token's logprobs, multiplied by the number of times each token has been seen in the respponse so far.
A positive penalty will discourage the use of tokens that have already been used, proportional to the number of times the token has been used: The more a token is used, the more difficult it is for the model to use that token again increasing the vocabulary of responses.
Caution: A negative penalty will encourage the model to reuse tokens proportional to the number of times the token has been used. Small negative values will reduce the vocabulary of a response. Larger negative values will cause the model to start repeating a common token until it hits the maxOutputTokens limit.
responseLogprobsbooleanOptional. If true, export the logprobs results in response.
logprobsinteger Optional. Only valid if responseLogprobs=True . This sets the number of top logprobs, including the chosen candidate, to return at each decoding step in the Candidate.logprobs_result . The number must be in the range of [0, 20].
enableEnhancedCivicAnswersbooleanOptional. Enables enhanced civic answers. It may not be available for all models.
speechConfigobject ( SpeechConfig )Optional. The speech generation config.
thinkingConfigobject ( ThinkingConfig )Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking.
imageConfigobject ( ImageConfig )Optional. Config for image generation. An error will be returned if this field is set for models that don't support these config options.
mediaResolutionenum ( MediaResolution )Optional. If specified, the media resolution specified will be used.
enableAffectiveDialogbooleanOptional. If enabled, the model will detect emotions and adapt its responses accordingly.
responseFormatobject ( ResponseFormatConfig )Optional. Configuration for the response output format. Allows specifying output configuration per modality (text, audio, image) in a flat structure.
translationConfigobject ( TranslationConfig )Optional. Config for translation.
audioTranscriptionConfigobject ( AudioTranscriptionConfig )Optional. Config for audio transcription (speech recognition).
| JSON উপস্থাপনা |
|---|
{ "stopSequences": [ string ], "responseMimeType": string, "responseSchema": { object ( |
পদ্ধতি
Supported modalities of the response.
| এনাম | |
|---|---|
MODALITY_UNSPECIFIED | Default value. |
TEXT | এটি নির্দেশ করে যে মডেলটি টেক্সট ফেরত দেবে। |
IMAGE | এটি নির্দেশ করে যে মডেলটি ছবি ফেরত দেবে। |
AUDIO | এটি নির্দেশ করে যে মডেলটি অডিও ফেরত দেবে। |
SpeechConfig
Config for speech generation and transcription.
voiceConfigobject ( VoiceConfig )The configuration in case of single-voice output.
multiSpeakerVoiceConfigobject ( MultiSpeakerVoiceConfig )Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voiceConfig field.
languageCodestringOptional. The IETF BCP-47 language code that the user configured the app to use. Used for speech recognition and synthesis.
Valid values are: de-DE , en-AU , en-GB , en-IN , en-US , es-US , fr-FR , hi-IN , pt-BR , ar-XA , es-ES , fr-CA , id-ID , it-IT , ja-JP , tr-TR , vi-VN , bn-IN , gu-IN , kn-IN , ml-IN , mr-IN , ta-IN , te-IN , nl-NL , ko-KR , cmn-CN , pl-PL , ru-RU , and th-TH .
| JSON উপস্থাপনা |
|---|
{ "voiceConfig": { object ( |
VoiceConfig
The configuration for the voice to use.
voice_configUnion typeprebuiltVoiceConfigobject ( PrebuiltVoiceConfig )The configuration for the prebuilt voice to use.
| JSON উপস্থাপনা |
|---|
{
// voice_config
"prebuiltVoiceConfig": {
object ( |
PrebuiltVoiceConfig
The configuration for the prebuilt speaker to use.
voiceNamestringOptional. The name of the preset voice to use.
| JSON উপস্থাপনা |
|---|
{ "voiceName": string } |
MultiSpeakerVoiceConfig
The configuration for the multi-speaker setup.
speakerVoiceConfigs[]object ( SpeakerVoiceConfig )Required. All the enabled speaker voices.
| JSON উপস্থাপনা |
|---|
{
"speakerVoiceConfigs": [
{
object ( |
SpeakerVoiceConfig
The configuration for a single speaker in a multi speaker setup.
speakerstringRequired. The name of the speaker to use. Should be the same as in the prompt.
voiceConfigobject ( VoiceConfig )Required. The configuration for the voice to use.
| JSON উপস্থাপনা |
|---|
{
"speaker": string,
"voiceConfig": {
object ( |
ThinkingConfig
Config for thinking features.
includeThoughtsbooleanIndicates whether to include thoughts in the response. If true, thoughts are returned only when available.
thinkingBudgetintegerThe number of thoughts tokens that the model should generate.
thinkingLevelenum ( ThinkingLevel )Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. The default value is model-dependent. Refer to the Thinking levels guide for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error.
| JSON উপস্থাপনা |
|---|
{
"includeThoughts": boolean,
"thinkingBudget": integer,
"thinkingLevel": enum ( |
ThinkingLevel
Allow user to specify how much to think using enum instead of integer budget.
| এনাম | |
|---|---|
THINKING_LEVEL_UNSPECIFIED | Default value. |
MINIMAL | খুব কম বা একেবারেই চিন্তা না করা। |
LOW | চিন্তার নিম্ন স্তর। |
MEDIUM | মাঝারি চিন্তার স্তর। |
HIGH | উচ্চ চিন্তার স্তর। |
ImageConfig
Config for image generation features.
aspectRatiostring Optional. The aspect ratio of the image to generate. Supported aspect ratios: 1:1 , 1:4 , 4:1 , 1:8 , 8:1 , 2:3 , 3:2 , 3:4 , 4:3 , 4:5 , 5:4 , 9:16 , 16:9 , or 21:9 .
If not specified, the model will choose a default aspect ratio based on any reference images provided.
imageSizestring Optional. Specifies the size of generated images. Supported values are 512 , 1K , 2K , 4K . If not specified, the model will use default value 1K .
| JSON উপস্থাপনা |
|---|
{ "aspectRatio": string, "imageSize": string } |
মিডিয়ারেজোলিউশন
Media resolution for the input media.
| এনাম | |
|---|---|
MEDIA_RESOLUTION_UNSPECIFIED | Media resolution has not been set. |
MEDIA_RESOLUTION_LOW | Media resolution set to low (64 tokens). |
MEDIA_RESOLUTION_MEDIUM | Media resolution set to medium (256 tokens). |
MEDIA_RESOLUTION_HIGH | Media resolution set to high (zoomed reframing with 256 tokens). |
ResponseFormatConfig
Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality.
textobject ( TextResponseFormat )Optional. Text output format configuration.
audioobject ( AudioResponseFormat )Optional. Audio output format configuration.
imageobject ( ImageResponseFormat )Optional. Image output format configuration.
| JSON উপস্থাপনা |
|---|
{ "text": { object ( |
TextResponseFormat
Configuration for text output format.
mimeTypeenum ( MimeType )Optional. The MIME type of the text output.
schemavalue ( Value format)Optional. The JSON schema that the output should conform to. Only applicable when mimeType is APPLICATION_JSON.
| JSON উপস্থাপনা |
|---|
{
"mimeType": enum ( |
মাইমটাইপ
Supported MIME types for text output.
| এনাম | |
|---|---|
MIME_TYPE_UNSPECIFIED | Default value. This value is unused. |
APPLICATION_JSON | JSON output format. |
TEXT_PLAIN | Plain text output format. |
AudioResponseFormat
Configuration for audio output format.
mimeTypeenum ( MimeType )Optional. The MIME type of the audio output.
deliveryenum ( Delivery )Optional. The delivery mode for the audio output.
sampleRateintegerOptional. Sample rate in Hz.
bitRateintegerOptional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
মাইমটাইপ
Supported MIME types for audio output.
| এনাম | |
|---|---|
MIME_TYPE_UNSPECIFIED | Default value. This value is unused. |
AUDIO_MP3 | MP3 audio format. |
AUDIO_OGG_OPUS | OGG Opus audio format. |
AUDIO_L16 | Raw PCM (L16) audio format. |
AUDIO_WAV | WAV audio format. |
AUDIO_ALAW | A-law audio format. |
AUDIO_MULAW | Mu-law audio format. |
ডেলিভারি
Delivery mode for audio output.
| এনাম | |
|---|---|
DELIVERY_UNSPECIFIED | Default value. This value is unused. |
INLINE | Audio data is returned inline in the response. |
URI | Audio data is returned as a URI. |
ImageResponseFormat
Configuration for image output format.
mimeTypeenum ( MimeType )Optional. The MIME type of the image output.
deliveryenum ( Delivery )Optional. The delivery mode for the image output.
aspectRatioenum ( AspectRatio )Optional. The aspect ratio for the image output.
imageSizeenum ( ImageSize )Optional. The size of the image output.
| JSON উপস্থাপনা |
|---|
{ "mimeType": enum ( |
মাইমটাইপ
Supported MIME types for image output.
| এনাম | |
|---|---|
MIME_TYPE_UNSPECIFIED | Default value. This value is unused. |
IMAGE_JPEG | JPEG image format. |
ডেলিভারি
Delivery mode for image output.
| এনাম | |
|---|---|
DELIVERY_UNSPECIFIED | Default value. This value is unused. |
INLINE | Image data is returned inline in the response. |
URI | Image data is returned as a URI. |
AspectRatio
Supported aspect ratios for image output.
| এনাম | |
|---|---|
ASPECT_RATIO_UNSPECIFIED | Default value. This value is unused. |
ASPECT_RATIO_ONE_BY_ONE | ১:১ আকৃতির অনুপাত। |
ASPECT_RATIO_TWO_BY_THREE | 2:3 aspect ratio. |
ASPECT_RATIO_THREE_BY_TWO | 3:2 aspect ratio. |
ASPECT_RATIO_THREE_BY_FOUR | 3:4 aspect ratio. |
ASPECT_RATIO_FOUR_BY_THREE | 4:3 aspect ratio. |
ASPECT_RATIO_FOUR_BY_FIVE | ৪:৫ আকৃতি অনুপাত। |
ASPECT_RATIO_FIVE_BY_FOUR | 5:4 aspect ratio. |
ASPECT_RATIO_NINE_BY_SIXTEEN | 9:16 aspect ratio. |
ASPECT_RATIO_SIXTEEN_BY_NINE | 16:9 aspect ratio. |
ASPECT_RATIO_TWENTY_ONE_BY_NINE | 21:9 aspect ratio. |
ASPECT_RATIO_ONE_BY_EIGHT | 1:8 aspect ratio. |
ASPECT_RATIO_EIGHT_BY_ONE | 8:1 aspect ratio. |
ASPECT_RATIO_ONE_BY_FOUR | 1:4 aspect ratio. |
ASPECT_RATIO_FOUR_BY_ONE | 4:1 aspect ratio. |
ImageSize
Supported image sizes for image output.
| এনাম | |
|---|---|
IMAGE_SIZE_UNSPECIFIED | Default value. This value is unused. |
IMAGE_SIZE_FIVE_TWELVE | 512px image size. |
IMAGE_SIZE_ONE_K | 1K image size. |
IMAGE_SIZE_TWO_K | 2K image size. |
IMAGE_SIZE_FOUR_K | 4K image size. |
অনুবাদ কনফিগারেশন
অনুবাদ বৈশিষ্ট্যগুলির জন্য কনফিগারেশন।
targetLanguageCodestringআবশ্যক। অনুবাদের জন্য লক্ষ্য ভাষা। সমর্থিত মানগুলি হলো BCP-47 ভাষা কোড (যেমন "en", "es", "fr")।
echoTargetLanguagebooleanঐচ্ছিক। যদি 'true' হয়, তাহলে টার্গেট ভাষা বলা হলে মডেলটি অডিও তৈরি করবে, অর্থাৎ এটি ইনপুটটি হুবহু পুনরাবৃত্তি করবে। যদি 'false' হয়, তাহলে আমরা টার্গেট ভাষার জন্য কোনো অডিও তৈরি করব না।
| JSON উপস্থাপনা |
|---|
{ "targetLanguageCode": string, "echoTargetLanguage": boolean } |
অডিও ট্রান্সক্রিপশন কনফিগারেশন
অডিও ট্রান্সক্রিপশন কনফিগারেশন।
languageCodes[]stringঐচ্ছিক। BCP-47 ভাষা কোড যা অডিওতে উপস্থিত ভাষাগুলো সম্পর্কে ইঙ্গিত দেয়। এটি বাদ দিলে বা খালি রাখলে, ডিফল্টরূপে স্বয়ংক্রিয় ভাষা শনাক্তকরণ ব্যবহৃত হবে।
adaptationPhrases[]
(deprecated)stringOptional. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms.
customVocabulary[]stringঐচ্ছিক। স্পিচ রিকগনিশন মডেলকে নির্দিষ্ট পদ (পণ্যের নাম, বিশেষ্য পদ, পারিভাষিক শব্দ) শনাক্ত করার দিকে প্রভাবিত করার জন্য নিজস্ব শব্দভাণ্ডারের একটি তালিকা।
wordTimestampbooleanঐচ্ছিক। এটি ওয়ার্ড-স্তরের টাইমস্ট্যাম্প তৈরি কনফিগার করে।
diarizationbooleanঐচ্ছিক। স্পিকার ডায়ারাইজেশন কনফিগার করে।
modeenum ( Mode ) ঐচ্ছিক। ট্রান্সক্রিপশন মোড কনফিগার করে। সমর্থিত মান: VERBATIM , SMART । নির্দিষ্ট না করা হলে, ডিফল্ট হিসেবে VERBATIM ট্রান্সক্রিপশন ব্যবহৃত হয়। SMART মোডে, মডেলটি সাবলীলতার অভাব দূর করে (অপ্রয়োজনীয় শব্দ, পুনরাবৃত্তি এবং ভুল শুরু বাদ দিয়ে), হালকা ব্যাকরণগত পরিমার্জন করে, স্বয়ংক্রিয়ভাবে ফরম্যাটিং করে (প্যারাগ্রাফ, বুলেট পয়েন্ট, সংখ্যাযুক্ত তালিকা) এবং ব্যবহারকারীর ছোটখাটো সম্পাদনা (ইনলাইন স্ব-সংশোধন) করে। টাইমস্ট্যাম্প এবং ডায়ারাইজেশন SMART মোডের সাথে সামঞ্জস্যপূর্ণ নয়।
language_configUnion typelanguage_codes instead. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: languageAuto
(deprecated)object ( LanguageAuto )Optional. The model will detect the language automatically.
languageHints
(deprecated)object ( LanguageHints )Optional. Specifies one or more languages in the audio.
| JSON উপস্থাপনা |
|---|
{ "languageCodes": [ string ], "adaptationPhrases": [ string ], "customVocabulary": [ string ], "wordTimestamp": boolean, "diarization": boolean, "mode": enum ( |
LanguageAuto
এই প্রকারে কোনো ক্ষেত্র নেই।
Indicates the language of the audio should be automatically detected.
LanguageHints
Provides hints to the model about possible languages present in the audio.
languageCodes[]
(deprecated)stringRequired. BCP-47 language codes.
| JSON উপস্থাপনা |
|---|
{ "languageCodes": [ string ] } |
মোড
ট্রান্সক্রিপশন মোড।
| এনাম | |
|---|---|
MODE_UNSPECIFIED | অনির্দিষ্ট ট্রান্সক্রিপশন মোড। |
VERBATIM | হুবহু প্রতিলিপি মোড। |
SMART | স্মার্ট ট্রান্সক্রিপশন মোড। |
রিয়েলটাইমইনপুটকনফিগ
BidiGenerateContent এ রিয়েলটাইম ইনপুট আচরণ কনফিগার করে।
automaticActivityDetectionobject ( AutomaticActivityDetection )ঐচ্ছিক। সেট করা না থাকলে, স্বয়ংক্রিয় কার্যকলাপ সনাক্তকরণ ডিফল্টরূপে সক্রিয় থাকে। যদি স্বয়ংক্রিয় ভয়েস সনাক্তকরণ নিষ্ক্রিয় করা থাকে, তবে ক্লায়েন্টকে অবশ্যই কার্যকলাপ সংকেত পাঠাতে হবে।
activityHandlingenum ( ActivityHandling )ঐচ্ছিক। কোনো কার্যকলাপের প্রভাব নির্ধারণ করে।
turnCoverageenum ( TurnCoverage )Optional. Defines which input is included in the user's turn.
| JSON উপস্থাপনা |
|---|
{ "automaticActivityDetection": { object ( |
স্বয়ংক্রিয় কার্যকলাপ সনাক্তকরণ
কার্যকলাপের স্বয়ংক্রিয় সনাক্তকরণ কনফিগার করে।
disabledbooleanঐচ্ছিক। যদি এটি সক্রিয় থাকে (যা ডিফল্টরূপে চালু থাকে), তাহলে শনাক্তকৃত ভয়েস এবং টেক্সট ইনপুট কার্যকলাপ হিসেবে গণ্য হবে। যদি এটি নিষ্ক্রিয় থাকে, তাহলে ক্লায়েন্টকে অবশ্যই কার্যকলাপ সংকেত পাঠাতে হবে।
startOfSpeechSensitivityenum ( StartSensitivity )ঐচ্ছিক। এটি নির্ধারণ করে যে কথা শনাক্ত হওয়ার সম্ভাবনা কতটা।
prefixPaddingMsintegerঐচ্ছিক। বক্তব্য শুরু হওয়ার আগে শনাক্তকৃত বক্তব্যের প্রয়োজনীয় সময়কাল। এই মান যত কম হবে, বক্তব্য শুরু শনাক্তকরণ তত বেশি সংবেদনশীল হবে এবং ছোট বক্তব্যও শনাক্ত করা যাবে। তবে, এতে ভুল শনাক্তকরণের সম্ভাবনাও বেড়ে যায়।
endOfSpeechSensitivityenum ( EndSensitivity )ঐচ্ছিক। শনাক্তকৃত বক্তব্য শেষ হওয়ার সম্ভাবনা কতটুকু, তা নির্ধারণ করে।
silenceDurationMsintegerঐচ্ছিক। কথা শেষ হওয়ার আগে শনাক্তকৃত কথাবিহীন অংশের (যেমন নীরবতা) প্রয়োজনীয় সময়কাল। এই মান যত বেশি হবে, ব্যবহারকারীর কাজে বাধা না দিয়ে কথার বিরতি তত দীর্ঘ হতে পারবে, কিন্তু এতে মডেলের ল্যাটেন্সি বেড়ে যাবে।
| JSON উপস্থাপনা |
|---|
{ "disabled": boolean, "startOfSpeechSensitivity": enum ( |
স্টার্টসেনসিটিভিটি
বক্তৃতার শুরু কীভাবে শনাক্ত করা হবে তা নির্ধারণ করে।
| এনাম | |
|---|---|
START_SENSITIVITY_UNSPECIFIED | ডিফল্ট মান হলো START_SENSITIVITY_HIGH। |
START_SENSITIVITY_HIGH | স্বয়ংক্রিয় সনাক্তকরণ ব্যবস্থা আরও ঘন ঘন বক্তৃতার শুরু সনাক্ত করবে। |
START_SENSITIVITY_LOW | স্বয়ংক্রিয় সনাক্তকরণ ব্যবস্থার মাধ্যমে বক্তৃতার শুরু কমই শনাক্ত করা যাবে। |
EndSensitive
বক্তৃতার সমাপ্তি কীভাবে শনাক্ত করা হবে তা নির্ধারণ করে।
| এনাম | |
|---|---|
END_SENSITIVITY_UNSPECIFIED | ডিফল্ট মান হলো END_SENSITIVITY_HIGH। |
END_SENSITIVITY_HIGH | স্বয়ংক্রিয় সনাক্তকরণ প্রায়শই বক্তৃতা শেষ করে দেয়। |
END_SENSITIVITY_LOW | স্বয়ংক্রিয় সনাক্তকরণ ব্যবস্থা বক্তৃতা শেষ হওয়ার ঘটনা কমই ঘটে। |
কার্যকলাপ পরিচালনা
ব্যবহারকারীর কার্যকলাপ পরিচালনার বিভিন্ন উপায়।
| এনাম | |
|---|---|
ACTIVITY_HANDLING_UNSPECIFIED | অনির্দিষ্ট থাকলে, ডিফল্ট আচরণ হলো START_OF_ACTIVITY_INTERRUPTS । |
START_OF_ACTIVITY_INTERRUPTS | যদি সত্য হয়, তাহলে কার্যকলাপ শুরু হলে মডেলের প্রতিক্রিয়া বাধাগ্রস্ত হবে (একে "বার্জ ইন"ও বলা হয়)। বাধাগ্রস্ত হওয়ার মুহূর্তে মডেলের বর্তমান প্রতিক্রিয়াটি বন্ধ হয়ে যাবে। এটিই ডিফল্ট আচরণ। |
NO_INTERRUPTION | মডেলের প্রতিক্রিয়া ব্যাহত হবে না। |
টার্ন কভারেজ
ব্যবহারকারীর পালায় কোন কোন ইনপুট অন্তর্ভুক্ত হবে সে সম্পর্কিত বিকল্পসমূহ।
| এনাম | |
|---|---|
TURN_COVERAGE_UNSPECIFIED | অনির্দিষ্ট থাকলে, মডেলের উপর ভিত্তি করে একটি ডিফল্ট আচরণ নির্বাচিত হয়। যেমন, Gemini 2.5-এর জন্য ডিফল্ট হলো TURN_INCLUDES_ONLY_ACTIVITY , আর Gemini 3.1 ও তার পরবর্তী সংস্করণগুলোর জন্য এটি হলো TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO । |
TURN_INCLUDES_ONLY_ACTIVITY | শেষ টার্নের পর থেকে হওয়া কার্যকলাপ অন্তর্ভুক্ত, তবে নিষ্ক্রিয়তা (যেমন অডিও স্ট্রিমে নীরবতা) বাদ দেওয়া হয়েছে। |
TURN_INCLUDES_ALL_INPUT | শেষ চালের পর থেকে সমস্ত রিয়েল-টাইম ইনপুট অন্তর্ভুক্ত, যার মধ্যে নিষ্ক্রিয়তাও (যেমন অডিও স্ট্রিমে নীরবতা) রয়েছে। |
TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO | শেষ পালা থেকে অডিও কার্যকলাপ এবং সমস্ত ভিডিও অন্তর্ভুক্ত। স্বয়ংক্রিয় কার্যকলাপ সনাক্তকরণের ক্ষেত্রে, অডিও কার্যকলাপ বলতে কথাবার্তা বোঝায় এবং নীরবতা এর অন্তর্ভুক্ত নয়। |
সেশনরিজাম্পশনকনফিগ
সেশন পুনরায় শুরু করার কনফিগারেশন।
This message is included in the session configuration as BidiGenerateContentSetup.session_resumption . If configured, the server will send SessionResumptionUpdate messages.
handlestringপূর্ববর্তী সেশনের হ্যান্ডেল। এটি উপস্থিত না থাকলে একটি নতুন সেশন তৈরি করা হয়।
পূর্ববর্তী সংযোগগুলিতে থাকা SessionResumptionUpdate.token ভ্যালু থেকে সেশন হ্যান্ডেলগুলি আসে।
| JSON উপস্থাপনা |
|---|
{ "handle": string } |
ContextWindowCompressionConfig
কনটেক্সট উইন্ডো কম্প্রেশন সক্ষম করে — এটি মডেলের কনটেক্সট উইন্ডোকে এমনভাবে পরিচালনা করার একটি পদ্ধতি, যাতে এটি একটি নির্দিষ্ট দৈর্ঘ্য অতিক্রম না করে।
compression_mechanismUnion typeslidingWindowobject ( SlidingWindow )একটি স্লাইডিং-উইন্ডো ব্যবস্থা।
triggerTokensstring ( int64 format)একটি টার্ন শুরু করার আগে কনটেক্সট উইন্ডো কম্প্রেশন চালু করার জন্য প্রয়োজনীয় টোকেনের সংখ্যা।
এটি কোয়ালিটি ও ল্যাটেন্সির মধ্যে ভারসাম্য রক্ষা করতে ব্যবহার করা যেতে পারে, কারণ ছোট কনটেক্সট উইন্ডোর ফলে মডেলের প্রতিক্রিয়া দ্রুততর হতে পারে। তবে, যেকোনো কম্প্রেশন অপারেশনের কারণে সাময়িকভাবে ল্যাটেন্সি বেড়ে যায়, তাই এগুলো ঘন ঘন চালু করা উচিত নয়।
সেট করা না থাকলে, ডিফল্ট হিসেবে মডেলের কনটেক্সট উইন্ডো লিমিটের ৮০% ব্যবহৃত হয়। এর ফলে পরবর্তী ইউজার রিকোয়েস্ট বা মডেল রেসপন্সের জন্য ২০% জায়গা অবশিষ্ট থাকে।
| JSON উপস্থাপনা |
|---|
{
// compression_mechanism
"slidingWindow": {
object ( |
স্লাইডিং উইন্ডো
The SlidingWindow method operates by discarding content at the beginning of the context window. The resulting context will always begin at the start of a USER role turn. System instructions and any BidiGenerateContentSetup.prefix_turns will always remain at the beginning of the result.
targetTokensstring ( int64 format)The target number of tokens to keep. The default value is triggerTokens/2.
কনটেক্সট উইন্ডোর অংশবিশেষ বাদ দিলে সাময়িকভাবে ল্যাটেন্সি বেড়ে যায়, তাই ঘন ঘন কম্প্রেশন অপারেশন এড়াতে এই মানটি ক্যালিব্রেট করা উচিত।
| JSON উপস্থাপনা |
|---|
{ "targetTokens": string } |
হিস্টোরিকনফিগ
ইতিহাস কনফিগারেশন।
This message is included in the session configuration as BidiGenerateContentSetup.history_config . Configures the exchange of history messages.
initialHistoryInClientContentboolean ঐচ্ছিক। যদি এটি সত্য হয়, setupComplete পাঠানোর পর, সার্ভার অপেক্ষা করবে এবং turnComplete true না হওয়া পর্যন্ত প্রথমে clientContent বার্তাগুলো প্রসেস করবে। এই প্রাথমিক প্রক্রিয়াটি কোনো মডেল কল ট্রিগার করবে না এবং এটি role MODEL দিয়ে শেষ হতে পারে। turnComplete true হওয়ার পর, ক্লায়েন্ট realtimeInput মাধ্যমে রিয়েলটাইম কথোপকথন শুরু করতে পারবে।
| JSON উপস্থাপনা |
|---|
{ "initialHistoryInClientContent": boolean } |
Method: auth_tokens.create
এমন একটি টোকেন তৈরি করে যা একটি BidiGenerateContent সেশনের আচরণ সীমাবদ্ধ করতে ব্যবহার করা যেতে পারে।
এন্ডপয়েন্ট
posthttps: / /generativelanguage.googleapis.com /v1beta /auth_tokensঅনুরোধকারী শরীর
The request body contains an instance of AuthToken .
expireTimestring ( Timestamp format)ঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। একটি ঐচ্ছিক সময়, যার পরে প্রাপ্ত টোকেনটি ব্যবহার করার সময় BidiGenerateContent সেশনের বার্তাগুলি প্রত্যাখ্যান করা হবে। (এই সময়ের পরে Gemini আগেভাগেই সেশনটি বন্ধ করে দিতে পারে।)
সেট করা না থাকলে, এটি স্বয়ংক্রিয়ভাবে ৩০ মিনিট ভবিষ্যতের সময় দেখাবে। সেট করা থাকলে, এই মানটি অবশ্যই ২০ ঘণ্টার কম ভবিষ্যতের হতে হবে।
RFC 3339 ব্যবহার করা হয়, যেখানে তৈরি হওয়া আউটপুট সর্বদা Z-নরম্যালাইজড হবে এবং এতে ০, ৩, ৬ বা ৯টি ভগ্নাংশীয় অঙ্ক ব্যবহৃত হবে। "Z" ছাড়াও অন্যান্য অফসেটও গ্রহণ করা হয়। উদাহরণ: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" অথবা "2014-10-02T15:01:23+05:30" ।
newSessionExpireTimestring ( Timestamp format)ঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। যে সময়ের পর এই অনুরোধের ফলে প্রাপ্ত টোকেন ব্যবহার করে নতুন লাইভ এপিআই সেশনগুলো প্রত্যাখ্যান করা হবে।
সেট করা না থাকলে এটি স্বয়ংক্রিয়ভাবে ভবিষ্যতের ৬০ সেকেন্ড সময় নেয়। সেট করা থাকলে, এই মানটি অবশ্যই ভবিষ্যতের ২০ ঘণ্টার কম হতে হবে।
RFC 3339 ব্যবহার করা হয়, যেখানে তৈরি হওয়া আউটপুট সর্বদা Z-নরম্যালাইজড হবে এবং এতে ০, ৩, ৬ বা ৯টি ভগ্নাংশীয় অঙ্ক ব্যবহৃত হবে। "Z" ছাড়াও অন্যান্য অফসেটও গ্রহণ করা হয়। উদাহরণ: "2014-10-02T15:01:23Z" , "2014-10-02T15:01:23.045123456Z" অথবা "2014-10-02T15:01:23+05:30" ।
fieldMaskstring ( FieldMask format) Optional. Input only. Immutable. If fieldMask is empty, and bidiGenerateContentSetup is not present, then the effective BidiGenerateContentSetup message is taken from the Live API connection.
If fieldMask is empty, and bidiGenerateContentSetup is present, then the effective BidiGenerateContentSetup message is taken entirely from bidiGenerateContentSetup in this request. The setup message from the Live API connection is ignored.
If fieldMask is not empty, then the corresponding fields from bidiGenerateContentSetup will overwrite the fields from the setup message in the Live API connection.
This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo" .
configUnion typebidiGenerateContentSetupobject ( BidiGenerateContentSetup ) ঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। BidiGenerateContent জন্য নির্দিষ্ট কনফিগারেশন।
usesintegerঐচ্ছিক। শুধুমাত্র ইনপুট। অপরিবর্তনীয়। টোকেনটি কতবার ব্যবহার করা যাবে। এই মান শূন্য হলে কোনো সীমা প্রযোজ্য হবে না। একটি লাইভ এপিআই সেশন পুনরায় শুরু করা ব্যবহার হিসাবে গণ্য হবে না। অনির্দিষ্ট থাকলে, ডিফল্ট মান হবে ১।
প্রতিক্রিয়া সংস্থা
If successful, the response body contains a newly created instance of AuthToken .