هناك مهمة نقوم بها اليوم تمكنت من إحراز تقدم جيد في أتمتتها باستخدام n8n، ولكني أتساءل عما إذا كان ذلك ممكنًا مع Discourse بشكل أصلي.
لدينا فئة مسودات يقوم فيها مديرو تسويق المنتجات بصياغة إعلانات المنتجات ليتم إرسالها حول منتجاتهم. عندما ينشئون تلك المسودة، ننظر إلى اسم المنتج، والإصدار، وما إذا كان إصدارًا رئيسيًا/ثانويًا/تصحيحيًا. نأخذ أيضًا نص محتوى إعلانهم ونلخصه باستخدام LLM لوصف المحتوى من 4 إلى 7 كلمات.
ثم نستخدم ذلك لإنشاء لافتة الإعلان في Adobe، هكذا:
Products
Endpoint Policy Manager
News
Netwrix is pleased to announce the general availability of Netwrix PolicyPak build number 25.2. With this release, you will be able to benefit from the following: PolicyPak - General End-of-Life for 32-bit PolicyPak This is a reminder that...
Reading time: 3 mins 🕑
Likes: 16 ❤
أشعر أن هذا يمكن القيام به بواسطة LLM وبعض المنطق التقليدي:
الخلفية عبارة عن لون واحد لكل نوع إعلان وهناك أربعة اختلافات من كل لون - نختار واحدًا بشكل عشوائي.
يتم إدخال اسم المنتج والإصدار في المربعات الموجودة في الأعلى
الوصف في المنتصف الأوسط للجسم هناك
نستخدم https://storyset.com/ لإنشاء رسم توضيحي سريع لوضعه على اليمين.
أشعر أن لدي نهجًا جيدًا للقيام بذلك باستخدام n8n، ولكني أتساءل عما إذا كان يمكن القيام بذلك بشكل أصلي باستخدام Discourse AI وأدوات أخرى؟
3 إعجابات
sam
(Sam Saffron)
1 مايو 2025، 1:46ص
3
الشخصية المصممة باستخدام نموذج GPT Image 1 الجديد الممتاز قادرة على القيام بأشياء مثل هذه:
AI Conversation with Us.anthropic.claude-3-7-sonnet-20250219-v1:0
sam : Help me make an announcement banner for PolicyPak 25.3: Client-Side Extension Enhancements. it should look modern and and include a banner. A bit about PolicyPak: Netwrix PolicyPak
netwrix.com/endpoint
CUSTOMER FEEDBACK
“Netwrix PolicyPak makes it much easier to comply with federal security mandates. In fact, in some cases, we would simply have no way
to implement the mandated settings without…
sonnet-3-7-thinking : [A modern, professional announcement banner for PolicyPak 25.3 featuring 'Client-Side Extension Enhancements' as the focus. The banner should have a clean, corporate tech aesthetic with a blue and white color scheme. Include the Netwrix logo and PolicyPak branding. The design should visualize endpoint management with subtle icons representing devices (laptops, desktops, mobile) connected acro…
sam : [This image announces PolicyPak version 25.3, highlighting "Client-Side Extension Enhancements" with an illustration of a person on a laptop next to a password graphic. (Captioned by AI)]
I was thinking more about this type of style.
try another prompt that emulates it a bit better.
...
Read full transcript
أعتقد أنه يمكنك ربط شيء ما باستخدام شخصية مخصصة واستخدام الأدوات المناسبة لتحقيق الكثير من هذا، بالتأكيد.
4 إعجابات
sam
(Sam Saffron)
1 مايو 2025، 3:23ص
4
ملاحظة لاستخدام الأدوات المخصصة، طالما أن هناك واجهات برمجة تطبيقات REST مناسبة يمكنك دمجها بسهولة، على سبيل المثال، هذه هي الطريقة التي أدمج بها مع إنشاء صور flux:
const apiKey = "password";
const model = "black-forest-labs/FLUX.1.1-pro";
let prompt;
function invoke(params) {
let seed = parseInt(params.seed);
if (!(seed > 0)) {
seed = Math.floor(Math.random() * 1000000) + 1;
}
let height = parseInt(params.height);
if (!height || height < 256 || height > 1440) {
height = 768;
}
let width = parseInt(params.width);
if (!width || width < 256 || width > 1440) {
width = 1024;
}
width = width - (width % 32);
height = height - (height %32);
prompt = params.prompt;
const negative_prompt = params.negative_prompt || "";
const body = {
model: model,
prompt: prompt,
width: width,
height: height,
steps: 10,
n: 1,
seed: seed,
negative_prompt: negative_prompt,
response_format: "b64_json",
};
const result = http.post("https://api.together.xyz/v1/images/generations", {
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (result.status !== 200) {
return { error: true, body: result.body };
}
const base64Image = JSON.parse(result.body).data[0].b64_json;
const image = upload.create("generated_image.png", base64Image);
const raw = `

`;
if (!params.show_to_user === false) {
chain.setCustomRaw(raw);
}
return { result: "Image generated successfully", prompt: prompt, url: image.url, seed: seed, negative_prompt: negative_prompt };
}
function details() {
return prompt;
}
يمكنك رؤية طلب HTTP POST وتحليل الصورة بترميز base 64 في العينة.
5 إعجابات
إذا تم تقديم نص منشور، فهل يقع على عاتق Discourse AI عبء تحويل المحتوى من هذا النص إلى معلمات صالحة لقراءة المحتوى ثم إنشاء كائن الطلب؟ أم يجب تمرير المحتوى الخام إلى الأداة ويقع عبء تحليل LLM لهذا الغرض للبيانات اللازمة لإنشاء إدخال مناسب لاستدعاء واجهة برمجة التطبيقات الخاصة به هناك؟
إعجاب واحد (1)
sam
(Sam Saffron)
1 مايو 2025، 4:04ص
6
نعم في هذه الحالة الأداة لديها بالفعل واجهة برمجة تطبيقات لقراءة المنشورات لذلك يمكنك فقط تمرير معرف
إعجابَين (2)
هل يمكنك أن تشير لي إلى وثائق هذا عن طريق الصدفة؟
sam
(Sam Saffron)
12 مايو 2025، 1:35ص
10
عذرًا على التأخير في الرد هنا، الأمر صعب، وثائقنا تتطور وسطح واجهة برمجة التطبيقات (API) ينمو أسبوعيًا.
توفر هذه التقنية نوعًا ما أميالًا دقيقة محدثة، لكنني أعتقد أننا بحاجة إلى الانتظار قليلًا حتى تستقر جميع واجهات برمجة التطبيقات (APIs) قبل ترسيخ الأمور:
AI Conversation with Gemini-2.5-pro:
sam: I need you to read discourse-ai/lib/personas/tool_runner.rb at main · discourse/discourse-ai · GitHu… gemini-2.5-pro: Okay, I can help with that!
First, I’ll need to fetch the content of the tool_runner.rb...
إعجابَين (2)