API
إعادة صياغة جزء من رسالة بالذكاء الاصطناعي
حتى خمس صيغ مختلفة لموضوع أو نص.
POST/emails/rewrite
ينفّذ الاستدعاء الحقيقي على مساحة عملك.
POST /emails/rewrite
حتى خمس صيغ مختلفة لموضوع أو نص.
مثال
يتطلب emails:send. وaction هو shorten أو lengthen أو rephrase أو formal أو casual أو custom، وcustom يحتاج إلى instruction ليقول ما الذي يُغيَّر. وtarget هو body، وهو الافتراضي، أو subject، وcount يطلب من 1 إلى 5 صيغ، و3 افتراضيًا.
curl -X POST "$OE/emails/rewrite" -H "$AUTH" -H "Content-Type: application/json" \ -d '{ "text": "Hey, did you get a chance to look at the contract?", "action": "formal", "count": 2 }'{ "object": "rewrite", "target": "body", "variations": [ "Hello, I wanted to ask whether you have had a chance to review the contract.", "Good morning. Have you been able to look over the contract yet?" ]}يجعل threadId إعادة الصياغة ملائمة للمحادثة التي تردّ فيها، ويتطلب threads:read.
لا تكرر الصيغُ النصَّ الأصلي أبدًا، وكل استدعاء يستهلك إجراء ذكاء اصطناعي واحدًا.