টেক্সট সাজেশনস API প্রোডাক্ট স্টুডিও API-এর জেনারেটিভ এআই টুলগুলিকে কাজে লাগায়, যা পণ্যের শিরোনাম এবং বর্ণনা তৈরি এবং অপ্টিমাইজ করে। আপনি এটি ব্যবহার করে গ্রাহকদের সাথে যুক্ত হওয়া এবং রূপান্তর উন্নত করতে পারেন, এবং পণ্যের তথ্য পরিচালনা এবং আপডেট করার প্রক্রিয়াটিকে সহজতর করতে পারেন। প্রোডাক্ট স্টুডিও API-এর বৈশিষ্ট্যগুলি আপনার খুচরা কর্মক্ষমতা অপ্টিমাইজ করতে সাহায্য করতে পারে।
API ব্যবহার করে আপনি কী তৈরি করতে পারেন?
টেক্সট সাজেশনস এপিআই আপনাকে নিম্নলিখিত কাজগুলি করতে সাহায্য করে:
- আপনার পণ্যের ছবি এবং/অথবা পণ্যের বৈশিষ্ট্যের উপর ভিত্তি করে প্রস্তাবিত পণ্যের শিরোনাম এবং বিবরণ।
- আপনার পণ্যের জন্য SEO-অপ্টিমাইজ করা শিরোনাম
- আপনার পণ্যের জন্য কাস্টম-ফরম্যাট করা শিরোনাম
- আপনার পণ্য ফিড থেকে পণ্যের বিবরণ
আপনি বর্ণনার জন্য কণ্ঠস্বরের সুরও নির্দিষ্ট করতে পারেন এবং আপনার সমস্ত পণ্য তালিকা জুড়ে ধারাবাহিকতা বজায় রাখতে পারেন।
দ্রুত শুরু
GenerateProductTextSuggestions পদ্ধতি আপনার পণ্যের তথ্য ব্যবহার করে পণ্যের শিরোনাম এবং বিবরণ তৈরি বা অপ্টিমাইজ করতে পারে।
API গ্রহণ করে:
- পণ্যের বৈশিষ্ট্য (JSON অভিধান): পণ্যের বৈশিষ্ট্য ধারণকারী একটি JSON অবজেক্ট (যেমন,
{"title": "White Tee", "brand": "MyBrand", "size": "XL"}) - পণ্যের ছবি: পণ্যের ছবির দিকে নির্দেশ করে এমন একটি URI (যেমন,
{"uri": "https://my-store.com/img/1.png"}) - শিরোনাম বিন্যাসের বিকল্প : শিরোনাম তৈরি কাস্টমাইজ করার জন্য প্যারামিটার, যার মধ্যে রয়েছে:
-
attribute_separator: বৈশিষ্ট্যের মধ্যে বিভাজক নির্দিষ্ট করে। -
target_language: আউটপুট ভাষা সেট করে। -
attribute_order: জেনারেট করা শিরোনামে অ্যাট্রিবিউটের ক্রম নির্ধারণ করে।
-
- ডেটা লেবেলিং উদাহরণ : বর্ণনা থেকে কীভাবে একটি শিরোনাম তৈরি করবেন তার একটি উদাহরণ দেখুন।
- ওয়ার্কফ্লো আইডি (
output_spec.workflow_id) :output_specঅবজেক্টের মধ্যেworkflow_idফিল্ড টেক্সট জেনারেশনের ধরণ নির্ধারণ করে:-
title: পণ্যের শিরোনাম তৈরি করে বা অপ্টিমাইজ করে। -
description: পণ্যের বিবরণ তৈরি করে বা অপ্টিমাইজ করে। -
tide: পণ্যের শিরোনাম এবং বিবরণ উভয়ই তৈরি করে বা অপ্টিমাইজ করে।
-
উদাহরণ
বিভিন্ন পণ্য ডেটা ইনপুট থেকে একটি শিরোনাম বা বিবরণ বা উভয় তৈরি বা অপ্টিমাইজ করার জন্য API ব্যবহার করার উদাহরণগুলি নীচে দেওয়া হল। আমরা সাধারণ ত্রুটি এবং সমস্যা এবং তাদের সমাধানগুলিও উপস্থাপন করি।
অপ্টিমাইজ করা শিরোনাম তৈরি
উদাহরণটি দেখায় কিভাবে একটি সর্বোত্তম শিরোনাম তৈরি করা যায়।
অনুরোধ
অনুরোধের বডিতে শিরোনাম অপ্টিমাইজেশনের জন্য ব্যবহারযোগ্য পণ্যের তথ্য থাকে। অনুরোধের কাঠামোর একটি উদাহরণ এখানে দেওয়া হল:
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"title": "Nike Mens shoes",
"description": "Give strength to your step with the Nike Air Zoom Pegasus 38 shoe for Men with shoe size 12. Ensuring the fit is loved by the runners. This shoes comes in Blue color.",
"brand": "Nike"
}
},
"output_spec": {
"workflow_id": "title"
}
}
প্রতিক্রিয়া
You can expect a response like
{
"title": {
"text": "Nike Mens shoes Air Zoom Pegasus 38 Running Shoes, Blue, Size 12"
},
"metadata": {
"metadata": {
"attributes": {
"color": "Blue",
"size": "12",
"product": "Running shoes",
"model": "Air Zoom Pegasus 38"
},
}
}
}
শুধুমাত্র একটি ছবি থেকে একটি শিরোনাম তৈরি করুন
উদাহরণটি দেখায় কিভাবে একটি পণ্যের ছবি প্রদান করতে হয় এবং একটি সর্বোত্তম শিরোনাম তৈরি করতে হয়।
অনুরোধ
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_image":{
"uri": "https://cdn.shopify.com/s/files/1/0653/5879/0892/products/1672082339438_550x825.jpg?v=1672082415"
}
},
"output_spec": {
"workflow_id": "title",
"attribute_separator": "-"
}
}
প্রতিক্রিয়া
{
"title": {
"text": "Rustic Ceramic & Leather Leaves Necklace"
},
"metadata": {
"metadata": {
"attributes": {
"material": "Rustic Ceramic & Leather",
"pattern": "Leaves",
"product": "Necklace"
},
}
}
}
একটি বর্ণনা থেকে একটি শিরোনাম তৈরি করুন
উদাহরণটি দেখায় কিভাবে একটি পণ্যের বিবরণ প্রদান করতে হয় এবং একটি সর্বোত্তম শিরোনাম তৈরি করতে হয়।
অনুরোধ
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"description": "selling size 12 nike dunks. oh they are red by the way!"
}
},
"output_spec": {
"workflow_id": "title",
}
}
প্রতিক্রিয়া
{
"title": {
"text": "Nike Dunks Red Size 12"
},
"metadata": {
"metadata": {
"attributes": {
"brand": "Nike",
"color": "Red",
"size": "12",
"product": "Dunks"
},
}
}
}
একটি শিরোনাম এবং বিবরণ থেকে শিরোনাম অপ্টিমাইজ করুন (কাস্টম উদাহরণ সহ)
এই উদাহরণে, আমরা স্পষ্টভাবে পণ্যের বৈশিষ্ট্যগুলিকে লেবেল করি যা আমরা AI দ্বারা সনাক্ত করতে চাই এবং আউটপুটে বৈশিষ্ট্যের ক্রম।
অনুরোধ
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"title": "Volumizing & Lengthening Mascara - Dark Brown",
"description": "This high-impact mascara delivers both voluptuous volume and dramatic length without clumping or smudging.",
"brand": "Luxe Beauty"
}
},
"output_spec": {
"workflow_id": "title"
}
"title_examples": [
{
"product_info": {
"title": "Lash Paradise Volumizing & Lengthening Mascara - Waterproof - Blackest Black",
"colour": "Black"
},
"title_format": "product",
"category": "mascara",
"final_product_info": {
"product": "Mascara",
"brand": "Lash Paradise",
"mascara_type": "Volumizing & Lengthening",
"colour": "Blackest Black",
"waterproof": "Waterproof",
}
},
{
"product_info": {
"title": "Hypnose Drama Instant Full Body Volume Mascara - Black",
"colour": "Black"
},
"title_format": "product",
"category": "mascara",
"final_product_info": {
"product": "Mascara",
"brand": "Hypnose",
"sub_brand": "Drama",
"mascara_type": "Full Body Volume",
"colour": "Black",
"eye_lash_type": "All lash types"
}
}
]
}
প্রতিক্রিয়া
{
"title": {
"text": "Luxe Beauty Dark Brown Volumizing & Lengthening Mascara"
},
"metadata": {
"metadata": {
"attributes": {
"brand": "Luxe Beauty",
"colour": "Dark Brown",
"mascara_type": "Volumizing & Lengthening",
"product": "Mascara"
},
}
}
}
একটি শিরোনাম থেকে বর্ণনা তৈরি করুন
উদাহরণটি দেখায় কিভাবে একটি পণ্যের শিরোনাম প্রদান করতে হয় এবং API-কে একটি সংশ্লিষ্ট পণ্যের বিবরণ তৈরি করতে বলা হয়।
অনুরোধ
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"title": "Rustic Ceramic & Leather Leaves Necklace",
}
},
"output_spec": {
"workflow_id": "description"
}
}
প্রতিক্রিয়া
{
"description": {
"text": "Rustic Ceramic & Leather Leaves Necklace is a beautiful necklace made from high-quality ceramic and leather. It features a unique design that is sure to turn heads.
"
},
}
পণ্যের বৈশিষ্ট্য (যেমন ব্র্যান্ড এবং রঙ) থেকে একটি শিরোনাম এবং বিবরণ তৈরি করুন
এই উদাহরণটি একটি সর্বোত্তম পণ্যের শিরোনাম এবং বিবরণ তৈরি করার জন্য পণ্যের বৈশিষ্ট্য প্রদানের বিষয়টি প্রদর্শন করে।
অনুরোধ
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"brand": "Mr. Beast",
"color": "purple",
},
"product_image":{
"uri": "https://mrbeast.store/cdn/shop/files/0015dlv_0000_327.jpg?v=1702754475&width=500"
}
},
"output_spec": {
"workflow_id": "description"
}
}
প্রতিক্রিয়া
{
"title": {
"text": "Pajamas - Mr. Beast | Purple"
},
"description": {
"text": "Slip into the ultimate comfort and style with these Mr. Beast pajamas in a vibrant shade of purple. Crafted from the softest materials, these pajamas will envelop you in a cozy embrace, ensuring a restful night's sleep. The shorts feature a relaxed fit, allowing for easy movement, while the top boasts a classic design with a comfortable neckline. Whether you're lounging at home or drifting off to dreamland, these Mr. Beast pajamas are the perfect choice for a peaceful and stylish slumber."
},
}
টার্গেট ল্যাঙ্গুয়েজ সাপোর্ট
এই ক্ষেত্রটি API প্রতিক্রিয়ায় তৈরি হওয়া বর্ণনার পাঠ্যের ভাষা নির্দিষ্ট করে। আপনি output_spec প্যারামিটারের অংশ হিসাবে target_language যোগ করতে পারেন:
{
"output_spec": {
"target_language": "language"
}
}
উদাহরণ মান:
"korean" (Korean)
"english" (English)
"spanish" (Spanish)
"french" (French)
উদাহরণ অনুরোধ
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"title": "Granos de café negro",
"description": "Los granos de café negro en California",
"brand": "Parfums de Paris",
"scent": "Floral",
},
"product_image":{
"uri": "https://mrbeast.store/cdn/shop/files/0015dlv_0000_327.jpg?v=1702754475&width=500"
}
},
"output_spec": {
"workflow_id": "description",
"target_language": "japanese",
"attribute_order": ["scent", "product"],
"tone": "playful",
}
}
প্রতিক্রিয়া
{
"description": {
"text": "カリフォルニアの黒いコーヒー豆は、あなたの鼻をくすぐる、甘く、フローラルな香りです。この香りは、コーヒー豆の豊かな香りと、ジャスミンとバラの繊細な花の香りをブレンドしたものです。カリフォルニアの黒いコーヒー豆は、あなたの家を居心地の良いカフェに変え、あなたをリラックスした気分にさせてくれるでしょう。この香りは、コーヒー好きにも、フローラルな香り好きにも最適です。カリフォルニアの黒いコーヒー豆で、あなたの家を幸せな香りで満たしましょう!."
},
}
বর্ণনা তৈরির জন্য ভয়েস ব্যক্তিগতকরণের সুর
আপনার ব্র্যান্ড প্রতিষ্ঠা করতে এবং আপনার অনলাইন স্টোরকে অন্যদের থেকে আলাদা করতে, আপনি আপনার তৈরি করা বর্ণনার কণ্ঠস্বর ব্যক্তিগতকৃত করতে পারেন। টেক্সট API দুটি বিকল্প অফার করে:
- পূর্বনির্ধারিত স্বর নির্বাচন: নতুন বর্ণনা তৈরি করতে আপনি স্বরের তালিকা থেকে নির্বাচন করতে পারেন। তালিকায় এই স্বর শৈলীগুলি অন্তর্ভুক্ত রয়েছে:
- ডিফল্ট: সহজ, স্পষ্ট এবং মার্জিত।
- কৌতুকপূর্ণ: হালকা মনের, ইতিবাচক ভাষা ব্যবহার, হাস্যরস (কৌতুক, শ্লেষ), এবং অতিরঞ্জন (কোনও বিদ্রূপ, ব্যঙ্গ বা ইমোজি নেই)।
- আনুষ্ঠানিক: স্ট্যান্ডার্ড ইংরেজি, সঠিক ব্যাকরণ, সম্পূর্ণ বাক্য, কোনও অপভাষা বা সংকোচন নেই।
- প্ররোচনামূলক: পাঠককে বোঝানোর জন্য যুক্তিসঙ্গত, সংক্ষিপ্ত এবং যুক্তি-চালিত।
- কথোপকথনমূলক: বন্ধুত্বপূর্ণ, সহজে বোধগম্য, দৈনন্দিন ভাষা।
- ব্র্যান্ড-নির্দিষ্ট স্বর: আপনি আপনার ব্র্যান্ডের স্বরে বিদ্যমান বর্ণনা বা অন্যান্য টেক্সট সম্পদ প্রদান করতে পারেন। জেনারেটিভ এআই মডেল টেক্সটের স্বর বিশ্লেষণ করবে এবং এই দিকগুলি অনুসারে একটি "লেখার স্টাইল বর্ণনাকারী" তৈরি করবে:
- আনুষ্ঠানিকতা (যেমন, আনুষ্ঠানিক, নৈমিত্তিক)
- শব্দচয়ন (যেমন, সংক্ষিপ্ত, খুব শব্দচয়ন)
- সুর (যেমন, পেশাদার, তথ্যবহুল, ইতিবাচক, প্ররোচনামূলক)
- বাক্য গঠন (যেমন, "কয়েকটি সংযোজন সহ সরল বাক্য")
- সর্বাধিক ব্যবহৃত শব্দ এবং বাক্যাংশ
ক্লায়েন্ট লাইব্রেরি
আমরা আপনাকে আপনার অনুরোধ জমা দেওয়ার জন্য ক্লায়েন্ট লাইব্রেরি ব্যবহার করার পরামর্শ দিচ্ছি। আমরা আপনার সাথে ক্লায়েন্ট লাইব্রেরিগুলি শেয়ার করব যা আপনি আপনার Maven প্রকল্পে ইনস্টল করতে পারেন।
কোড নমুনা
আপনার প্রমাণীকরণের পদ্ধতিটি বেছে নিন এবং এই নির্দেশাবলী ব্যবহার করে এই কোড নমুনাগুলি সেট আপ করুন। এখানে একটি নমুনা দেওয়া হল যা আপনি টেক্সট পরামর্শ তৈরি করতে ব্যবহার করতে পারেন।
জাভা
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.shopping.merchant.productstudio.v1alpha.GenerateProductTextSuggestionsRequest;
import com.google.shopping.merchant.productstudio.v1alpha.GenerateProductTextSuggestionsResponse;
import com.google.shopping.merchant.productstudio.v1alpha.OutputSpec;
import com.google.shopping.merchant.productstudio.v1alpha.ProductInfo;
import com.google.shopping.merchant.productstudio.v1alpha.TextSuggestionsServiceClient;
import com.google.shopping.merchant.productstudio.v1alpha.TextSuggestionsServiceSettings;
import shopping.merchant.samples.utils.Authenticator;
import shopping.merchant.samples.utils.Config;
/** This class demonstrates how to generate product text suggestions. */
public class GenerateProductTextSuggestionsSample {
private static String getName(String accountId) {
return String.format("accounts/%s", accountId);
}
public static void generateProductTextSuggestions(Config config) throws Exception {
// Obtains OAuth token based on the user's configuration.
GoogleCredentials credential = new Authenticator().authenticate();
TextSuggestionsServiceSettings textSuggestionsServiceSettings =
TextSuggestionsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(credential))
.build();
String name = getName(config.getAccountId().toString());
// Calls the API and catches and prints any network failures/errors.
try (TextSuggestionsServiceClient textSuggestionsServiceClient =
TextSuggestionsServiceClient.create(textSuggestionsServiceSettings)) {
ProductInfo productInfo =
ProductInfo.newBuilder()
.putProductAttributes("title", "Mens shirt")
.putProductAttributes("description", "A blue shirt for men in size S")
.build();
OutputSpec outputSpec = OutputSpec.newBuilder().setWorkflowId("title").build();
GenerateProductTextSuggestionsRequest request =
GenerateProductTextSuggestionsRequest.newBuilder()
.setName(name)
.setProductInfo(productInfo)
.setOutputSpec(outputSpec)
.build();
System.out.println("Sending GenerateProductTextSuggestions request: " + name);
GenerateProductTextSuggestionsResponse response =
textSuggestionsServiceClient.generateProductTextSuggestions(request);
System.out.println("Generated product text suggestions response below:");
System.out.println(response);
} catch (Exception e) {
System.out.println("An error has occured: ");
System.out.println(e);
}
}
public static void main(String[] args) throws Exception {
Config config = Config.load();
generateProductTextSuggestions(config);
}
}
পাইথন
"""A module to generate product text suggestions."""
from examples.authentication import configuration
from examples.authentication import generate_user_credentials
from google.shopping.merchant_productstudio_v1alpha import GenerateProductTextSuggestionsRequest
from google.shopping.merchant_productstudio_v1alpha import OutputSpec
from google.shopping.merchant_productstudio_v1alpha import ProductInfo
from google.shopping.merchant_productstudio_v1alpha import TextSuggestionsServiceClient
# Fetches the Merchant Center account ID from the configuration file.
# This ID is used to construct the 'name' for the API request.
_ACCOUNT_ID = configuration.Configuration().read_merchant_info()
# The parent resource name for the GenerateProductTextSuggestionsRequest.
# Format: "accounts/{account}"
_PARENT_RESOURCE_NAME = f"accounts/{_ACCOUNT_ID}"
def generate_product_text_suggestions_sample():
"""Generates product text suggestions for a given product."""
# Gets OAuth Credentials.
credentials = generate_user_credentials.main()
# Creates a client for the TextSuggestionsService.
client = TextSuggestionsServiceClient(credentials=credentials)
# Defines the product information for which suggestions are needed.
# This includes attributes like title and description.
product_info = ProductInfo(
product_attributes={
"title": "Mens shirt",
"description": "A blue shirt for men in size S",
}
)
# Defines the output specification.
# The 'workflow_id' specifies the type of text suggestion, e.g., "title".
output_spec = OutputSpec(workflow_id="title")
# Creates the request object for generating product text suggestions.
# It includes the parent resource name, product information, and output
# specification.
request = GenerateProductTextSuggestionsRequest(
name=_PARENT_RESOURCE_NAME,
product_info=product_info,
output_spec=output_spec,
)
# Sends the request to the API.
print(
f"Sending GenerateProductTextSuggestions request: {_PARENT_RESOURCE_NAME}"
)
try:
response = client.generate_product_text_suggestions(request=request)
# Prints the generated suggestions.
print("Generated product text suggestions response below:")
print(response)
except RuntimeError as e:
# Catches and prints any errors that occur during the API call.
print("An error has occured: ")
print(e)
if __name__ == "__main__":
generate_product_text_suggestions_sample()
সাধারণ ত্রুটি এবং সমস্যা
এখানে কিছু সাধারণ সমস্যা এবং তাদের সমাধান দেওয়া হল।
টেক্সট সাজেশন তৈরি করতে পণ্যের তথ্য প্রয়োজন
আপনি যদি নিম্নলিখিত ত্রুটি বার্তাটি পান
Error message:
"error": {
"code": 400,
"message": "[product_info] Product info is required to generate text suggestions.",
"status": "INVALID_ARGUMENT",
...
}
অনুরোধের বডিতে product_info যোগ করুন এবং product_attributes অথবা product_image এর মধ্যে অন্তত একটি সঠিকভাবে পূরণ করুন।
উদাহরণস্বরূপ, এটি পোস্ট করলে একটি ত্রুটি দেখা দেবে।
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"output_spec": {
"workflow_id": "title"
}
}
টেক্সট সাজেশন তৈরি করতে product_info-এর কমপক্ষে একটি ফিল্ড প্রয়োজন
এই ত্রুটি
{
"error": {
"code": 400,
"message": "[product_info.product_attributes] At least one field of product_info is required to generate text suggestions.",
"status": "INVALID_ARGUMENT",
...
}
এটি একটি ইঙ্গিত যে আপনাকে অনুরোধের বডিতে কমপক্ষে একটি product_info ক্ষেত্র অন্তর্ভুক্ত করতে হবে।
উদাহরণস্বরূপ, এটি পোস্ট করলে একটি ত্রুটি দেখা দেবে।
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
},
"output_spec": {
"workflow_id": "title"
}
}
পরিবর্তে এরকম কিছু ব্যবহার করুন
"product_info": {
"product_attributes": {
"description": "Selling size 12 Nike dunks. Oh they are red by the way!"
}
}
অথবা
"product_info": {
"product_image":{
"uri": "https://cdn.shopify.com/s/files/1/0653/5879/0892/products/1672082339438_550x825.jpg?v=1672082415"
}
}
প্রতিটি title_example-এ (কিছু না কিছু) আবশ্যক
নিম্নলিখিত চারটি উদাহরণের মতো ত্রুটিগুলি
{
"error": {
"code": 400,
"message": "[title_examples.product_info] At least one field of product_info is required in each title_example.",
"status": "INVALID_ARGUMENT",
...
}
অথবা
{
...
"message": "[title_examples.category] Category is required in each title_example.",
...
}
অথবা
{
...
"message": "[title_examples.title_format] Title format is required in each title_example.",
...
}
অথবা
{
...
"message": "[title_examples.final_product_info] At least one field of final_product_info is required in each title_example.",
...
}
নির্দেশ করুন যে আপনি একটি প্রয়োজনীয় উপ-ক্ষেত্র পূরণ করেননি।
উদাহরণস্বরূপ, নিম্নলিখিত অনুরোধটি একটি ত্রুটি তৈরি করবে।
POST
https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"description": "selling size 12 nike dunks. oh they are red by the way!"
}
},
"output_spec": {
"workflow_id": "title"
},
"title_examples": []
}
এটি সমাধানের জন্য, অনুরোধে উল্লেখিত প্রতিটি title_example এর জন্য নিম্নলিখিত সমস্ত উপ-ক্ষেত্র পূরণ করুন:
-
product_info -
category -
title_format -
final_product_info
এখানে একটি উদাহরণ দেওয়া হল যা কাজ করে:
{
"product_info": {
"product_attributes": {
"title": "Volumizing & Lengthening Mascara - Dark Brown",
"description": "This high-impact mascara delivers both voluptuous volume and dramatic length without clumping or smudging.",
}
},
"output_spec": {
"workflow_id": "title"
},
"title_examples": [
{
"product_info": {
"title": "Lash Paradise Volumizing & Lengthening Mascara - Waterproof - Blackest Black",
"colour": "Black"
},
"title_format": "product",
"category": "mascara",
"final_product_info": {
"product": "Mascara",
"brand": "Lash Paradise",
"mascara_type": "Volumizing & Lengthening",
"colour": "Blackest Black",
"waterproof": "Waterproof",
}
}
]
}
অসমর্থিত ওয়ার্কফ্লো_আইডি
এই ধরণের ত্রুটি
{
"error": {
"code": 400,
"message": "[\u003ceye3 title='/ProductStudioTextGenerationService.GenerateProductText, INVALID_ARGUMENT'/\u003e APPLICATION_ERROR; ... ;Unsupported workflow_id: attributes. Supported workflows are: [\"title\", \"description\", \"tide\"];AppErrorCode=3;StartTimeMs=1740696804045;unknown;ResFormat=uncompressed;ServerTimeSec=0.005976589;LogBytes=256;Non-FailFast;EffSecLevel=none;ReqFormat=uncompressed;ReqID=4d1786f59faa3ea7;GlobalID=0;Server=[2002:a05:6e16:618:b0:2c2:7cfc:bebd]:14001] Invalid value",
"status": "INVALID_ARGUMENT",
...
}
এর মতো অনুরোধের ফলে হবে
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"title": "Volumizing & Lengthening Mascara - Dark Brown",
"description": "This high-impact mascara delivers both voluptuous volume and dramatic length without clumping or smudging.",
},
"output_spec": {
"workflow_id": "attributes"
}
}
অনুরোধটি workflow_id "attributes" তে সেট করে, কিন্তু এই ক্ষেত্রটি নিম্নলিখিত মানগুলির মধ্যে শুধুমাত্র একটি সমর্থন করে:
- title : পণ্যের শিরোনাম তৈরি করে বা অপ্টিমাইজ করে।
- বর্ণনা : পণ্যের বিবরণ তৈরি করে বা অপ্টিমাইজ করে।
- জোয়ার : পণ্যের শিরোনাম এবং বিবরণ উভয়ই তৈরি করে বা অপ্টিমাইজ করে।
অসমর্থিত স্বর
একটি "অসমর্থিত স্বর" ত্রুটি যেমন
{
"error": {
"code": 400,
"message": "[\u003ceye3 title='/ProductStudioTextGenerationService.GenerateProductText, INVALID_ARGUMENT'/\u003e APPLICATION_ERROR; ... ; Unsupported tone: 'asdf'. Supported tones are: [\"default\", \"playful\", \"formal\", \"persuasive\", \"conversational\"];AppErrorCode=3;StartTimeMs=1740697325058;unknown;ResFormat=uncompressed;ServerTimeSec=7.45346E-4;LogBytes=256;Non-FailFast;EffSecLevel=none;ReqFormat=uncompressed;ReqID=f7d9bbbc73a1d342;GlobalID=0;Server=[2002:a05:6918:3486:b0:2bc:ccd4:79e6]:14001] Invalid value",
"status": "INVALID_ARGUMENT",
...
}
যেমন একটি অনুরোধের ফলে হবে
POST https://merchantapi.googleapis.com/productstudio/v1alpha/accounts/{ACCOUNT_ID}:generateProductTextSuggestions
{
"product_info": {
"product_attributes": {
"title": "Volumizing & Lengthening Mascara - Dark Brown",
"description": "This high-impact mascara delivers both voluptuous volume and dramatic length without clumping or smudging.",
},
"output_spec": {
"workflow_id": "description"
"tone": "cheerful"
}
}
লক্ষ্য করুন যে tone "cheerful" তে সেট করা হচ্ছে, কিন্তু এই ক্ষেত্রটি নিম্নলিখিত মানগুলির মধ্যে শুধুমাত্র একটি সমর্থন করে:
- ডিফল্ট : সহজ, স্পষ্ট এবং মার্জিত।
- খেলাধুলাপূর্ণ : হালকা মনের, ইতিবাচক ভাষা ব্যবহার, হাস্যরস (কৌতুক, শ্লেষ), এবং অতিরঞ্জন (কোনও বিদ্রূপ, ব্যঙ্গ বা ইমোজি নেই)।
- আনুষ্ঠানিক : স্ট্যান্ডার্ড ইংরেজি, সঠিক ব্যাকরণ, সম্পূর্ণ বাক্য, কোনও অপভাষা বা সংকোচন নেই।
- প্ররোচনামূলক : পাঠককে বোঝানোর জন্য যুক্তিসঙ্গত, সংক্ষিপ্ত এবং যুক্তি-চালিত।
- কথোপকথনমূলক : বন্ধুত্বপূর্ণ, সহজে বোধগম্য, দৈনন্দিন ভাষা।