টেক্সট সাজেশন জেনারেট করুন

টেক্সট সাজেশন এপিআই প্রোডাক্ট স্টুডিও এপিআই-এর জেনারেটিভ এআই টুল ব্যবহার করে প্রোডাক্টের শিরোনাম এবং বিবরণ জেনারেট এবং অপ্টিমাইজ করতে। আপনি এটি ব্যবহার করতে পারেন গ্রাহকের সম্পৃক্ততা এবং রূপান্তর উন্নত করতে, এবং পণ্যের তথ্য পরিচালনা এবং আপডেট করার প্রক্রিয়াটিকে প্রবাহিত করতে। প্রোডাক্ট স্টুডিও 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"
   }
}

প্রতিক্রিয়া

আপনি একটি মত প্রতিক্রিয়া আশা করতে পারেন

{
  "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);
  }
}

সাধারণ ত্রুটি এবং সমস্যা

এখানে কয়েকটি সাধারণ ত্রুটি এবং তাদের সমাধান রয়েছে।

টেক্সট সাজেশন জেনারেট করতে পণ্যের তথ্য প্রয়োজন

আপনি নিম্নলিখিত ত্রুটি বার্তা পেতে হবে

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"
    }
}

প্রতিটি শিরোনাম_উদাহরণে (কিছু) প্রয়োজন

নিম্নলিখিত চার উদাহরণ মত ত্রুটি

{
  "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": []
}

এটি সমাধান করার জন্য, অনুরোধে উল্লেখ করা প্রতিটি শিরোনাম_উদাহরণ-এর জন্য নিম্নলিখিত সমস্ত সাব-ক্ষেত্রগুলি পূরণ করুন:

  • 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",
      }
    }
  ]
}

অসমর্থিত workflow_id

এই ধরনের ত্রুটি

{
  "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 "বিশেষণ"-এ সেট করে, কিন্তু এই ক্ষেত্রটি নিম্নলিখিত মানগুলির মধ্যে একটিকে সমর্থন করে:

  • শিরোনাম : পণ্যের শিরোনাম তৈরি বা অপ্টিমাইজ করে।
  • বর্ণনা : পণ্যের বিবরণ তৈরি করে বা অপ্টিমাইজ করে।
  • জোয়ার : পণ্যের শিরোনাম এবং বিবরণ উভয়ই তৈরি বা অপ্টিমাইজ করে।

অসমর্থিত টোন

একটি "অসমর্থিত টোন" ত্রুটি যেমন

{
  "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 "প্রফুল্ল" তে সেট করা হচ্ছে, কিন্তু এই ক্ষেত্রটি নিম্নলিখিত মানগুলির মধ্যে একটিকে সমর্থন করে:

  • ডিফল্ট : সরল, পরিষ্কার এবং মার্জিত।
  • কৌতুকপূর্ণ : হালকা হৃদয়, ইতিবাচক ভাষা ব্যবহার করে, হাস্যরস (কৌতুক, শ্লেষ) এবং অতিরঞ্জন (কোন বিড়ম্বনা, কটাক্ষ বা ইমোজি নয়)।
  • আনুষ্ঠানিক : স্ট্যান্ডার্ড ইংরেজি, সঠিক ব্যাকরণ, সম্পূর্ণ বাক্য, কোন অপবাদ বা সংকোচন নেই।
  • অনুপ্রেরণামূলক : যৌক্তিক, সংক্ষিপ্ত, এবং পাঠককে বোঝানোর জন্য যুক্তি-চালিত।
  • কথোপকথন : বন্ধুত্বপূর্ণ, সহজে বোঝা যায়, দৈনন্দিন ভাষা।