@moltium/core 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1136,7 +1136,23 @@ var Agent = class {
|
|
|
1136
1136
|
logger4.info("Startup post: No connected social adapters \u2014 skipping");
|
|
1137
1137
|
return;
|
|
1138
1138
|
}
|
|
1139
|
-
|
|
1139
|
+
let content;
|
|
1140
|
+
try {
|
|
1141
|
+
const prompt = `You just came online. Write a short, engaging first post for social media.
|
|
1142
|
+
Stay fully in character \u2014 your personality, background, and role are defined in the system prompt.
|
|
1143
|
+
Do NOT use generic phrases like "is now online and ready" or "Hello, world!".
|
|
1144
|
+
Do NOT describe yourself in third person. Do NOT use emojis unless your personality calls for it.
|
|
1145
|
+
Write only the post content, nothing else. Keep it concise and natural.`;
|
|
1146
|
+
content = (await this.llm.generateText(prompt, {
|
|
1147
|
+
systemPrompt: this.systemPrompt,
|
|
1148
|
+
temperature: this.config.llm.temperature ?? 0.8,
|
|
1149
|
+
maxTokens: 280
|
|
1150
|
+
})).trim();
|
|
1151
|
+
logger4.info(`Startup post: LLM generated content (${content.length} chars)`);
|
|
1152
|
+
} catch (error) {
|
|
1153
|
+
logger4.warn(`Startup post: LLM generation failed (${error.message}), using fallback`);
|
|
1154
|
+
content = `${this.config.name} is now online and ready.`;
|
|
1155
|
+
}
|
|
1140
1156
|
for (const [platform, adapter] of adapters) {
|
|
1141
1157
|
logger4.info(`Startup post: Posting to ${platform}...`);
|
|
1142
1158
|
try {
|
|
@@ -1205,8 +1221,11 @@ var Agent = class {
|
|
|
1205
1221
|
const adapter = this.socialAdapters[platform];
|
|
1206
1222
|
if (!adapter) return;
|
|
1207
1223
|
try {
|
|
1208
|
-
const prompt = `
|
|
1224
|
+
const prompt = `Generate a short, engaging social media post for ${platform}.
|
|
1225
|
+
Stay fully in character based on your personality in the system prompt.
|
|
1226
|
+
Write only the post content, nothing else. Keep it concise and natural.`;
|
|
1209
1227
|
const content = await this.llm.generateText(prompt, {
|
|
1228
|
+
systemPrompt: this.systemPrompt,
|
|
1210
1229
|
temperature: this.config.llm.temperature ?? 0.8,
|
|
1211
1230
|
maxTokens: 280
|
|
1212
1231
|
});
|