Optimize
Optimize a given text using specific instructions.
NodeJS
const rpai = await ai.optimize({
text: "FakeBrand Boa XL Max Water Pump Pliers in a Festive Christmas Ornament",
instruction: "SEO for an online store product title",
});
console.log("Optimized title:", rpai.response);.NET
//Response format can be created manually but it is easier to use a type
//await ai.Optimize(new() {
//Text= "FakeBrand Boa XL Max Water Pump Pliers in a Festive Christmas Ornament",
//Instruction= "SEO for an online store product title"
//}).ConfigureAwait(false);
var rpai = await ai.Optimize<string>(new() {
Text= "FakeBrand Boa XL Max Water Pump Pliers in a Festive Christmas Ornament",
Instruction= "SEO for an online store product title"
}).ConfigureAwait(false);
Console.WriteLine("Optimized title: {0}", rpai);/api/v1/ai/Optimize – Optimize Text Based on Instructions
Last updated