@elizaos/core 1.0.0-beta.75 → 1.0.0-beta.76
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 +34 -0
- package/dist/prompts.d.ts +1 -0
- package/dist/types.d.ts +13 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5116,6 +5116,14 @@ var MemoryType = /* @__PURE__ */ ((MemoryType2) => {
|
|
|
5116
5116
|
MemoryType2["CUSTOM"] = "custom";
|
|
5117
5117
|
return MemoryType2;
|
|
5118
5118
|
})(MemoryType || {});
|
|
5119
|
+
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
5120
|
+
ContentType2["IMAGE"] = "image";
|
|
5121
|
+
ContentType2["VIDEO"] = "video";
|
|
5122
|
+
ContentType2["AUDIO"] = "audio";
|
|
5123
|
+
ContentType2["DOCUMENT"] = "document";
|
|
5124
|
+
ContentType2["LINK"] = "link";
|
|
5125
|
+
return ContentType2;
|
|
5126
|
+
})(ContentType || {});
|
|
5119
5127
|
var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
|
|
5120
5128
|
ChannelType2["SELF"] = "SELF";
|
|
5121
5129
|
ChannelType2["DM"] = "dm";
|
|
@@ -30434,6 +30442,30 @@ Go directly to the XML response format without any preamble or explanation.
|
|
|
30434
30442
|
|
|
30435
30443
|
IMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.`;
|
|
30436
30444
|
var booleanFooter = "Respond with only a YES or a NO.";
|
|
30445
|
+
var imageDescriptionTemplate = `<task>Analyze the provided image and generate a comprehensive description with multiple levels of detail.</task>
|
|
30446
|
+
|
|
30447
|
+
<instructions>
|
|
30448
|
+
Carefully examine the image and provide:
|
|
30449
|
+
1. A concise, descriptive title that captures the main subject or scene
|
|
30450
|
+
2. A brief summary description (1-2 sentences) highlighting the key elements
|
|
30451
|
+
3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details
|
|
30452
|
+
|
|
30453
|
+
Be objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.
|
|
30454
|
+
</instructions>
|
|
30455
|
+
|
|
30456
|
+
<output>
|
|
30457
|
+
Do NOT include any thinking, reasoning, or <think> sections in your response.
|
|
30458
|
+
Go directly to the XML response format without any preamble or explanation.
|
|
30459
|
+
|
|
30460
|
+
Respond using XML format like this:
|
|
30461
|
+
<response>
|
|
30462
|
+
<title>A concise, descriptive title for the image</title>
|
|
30463
|
+
<description>A brief 1-2 sentence summary of the key elements in the image</description>
|
|
30464
|
+
<text>An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image</text>
|
|
30465
|
+
</response>
|
|
30466
|
+
|
|
30467
|
+
IMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.
|
|
30468
|
+
</output>`;
|
|
30437
30469
|
|
|
30438
30470
|
// src/roles.ts
|
|
30439
30471
|
async function getUserServerRole(runtime, entityId, serverId) {
|
|
@@ -33897,6 +33929,7 @@ export {
|
|
|
33897
33929
|
BM25,
|
|
33898
33930
|
CacheKeyPrefix,
|
|
33899
33931
|
ChannelType,
|
|
33932
|
+
ContentType,
|
|
33900
33933
|
DatabaseAdapter,
|
|
33901
33934
|
EventType,
|
|
33902
33935
|
InstrumentationService,
|
|
@@ -33950,6 +33983,7 @@ export {
|
|
|
33950
33983
|
getUserServerRole,
|
|
33951
33984
|
getWavHeader,
|
|
33952
33985
|
getWorldSettings,
|
|
33986
|
+
imageDescriptionTemplate,
|
|
33953
33987
|
initializeOnboarding,
|
|
33954
33988
|
isCustomMetadata,
|
|
33955
33989
|
isDescriptionMetadata,
|
package/dist/prompts.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ export declare const shouldRespondTemplate = "<task>Decide on behalf of {{agentN
|
|
|
2
2
|
export declare const messageHandlerTemplate = "<task>Generate dialog and actions for the character {{agentName}}.</task>\n\n<providers>\n{{providers}}\n</providers>\n\nThese are the available valid actions:\n<actionNames>\n{{actionNames}}\n</actionNames>\n\n<instructions>\nWrite a thought and plan for {{agentName}} and decide what actions to take. Also include the providers that {{agentName}} will use to have the right context for responding and acting, if any.\n\nIMPORTANT PROVIDER SELECTION RULES:\n- If the message mentions images, photos, pictures, attachments, or visual content, OR if you see \"(Attachments:\" in the conversation, you MUST include \"ATTACHMENTS\" in your providers list\n- If the message asks about or references specific people, include \"ENTITIES\" in your providers list \n- If the message asks about relationships or connections between people, include \"RELATIONSHIPS\" in your providers list\n- If the message asks about facts or specific information, include \"FACTS\" in your providers list\n- If the message asks about the environment or world context, include \"WORLD\" in your providers list\n- If you need external knowledge, information, or context beyond the current conversation to provide a helpful response, include \"KNOWLEDGE\" in your providers list\n\nFirst, think about what you want to do next and plan your actions. Then, write the next message and include the actions you plan to take.\n</instructions>\n\n<keys>\n\"thought\" should be a short description of what the agent is thinking about and planning.\n\"actions\" should be a comma-separated list of the actions {{agentName}} plans to take based on the thought (if none, use IGNORE, if simply responding with text, use REPLY)\n\"providers\" should be a comma-separated list of the providers that {{agentName}} will use to have the right context for responding and acting (NEVER use \"IGNORE\" as a provider - use specific provider names like ATTACHMENTS, ENTITIES, FACTS, KNOWLEDGE, etc.)\n\"evaluators\" should be an optional comma-separated list of the evaluators that {{agentName}} will use to evaluate the conversation after responding\n\"text\" should be the text of the next message for {{agentName}} which they will send to the conversation.\n</keys>\n\n<output>\nDo NOT include any thinking, reasoning, or <think> sections in your response. \nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <thought>Your thought here</thought>\n <actions>ACTION1,ACTION2</actions>\n <providers>PROVIDER1,PROVIDER2</providers>\n <text>Your response text here</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.\n</output>";
|
|
3
3
|
export declare const postCreationTemplate = "# Task: Create a post in the voice and style and perspective of {{agentName}} @{{twitterUserName}}.\n\nExample task outputs:\n1. A post about the importance of AI in our lives\n<response>\n <thought>I am thinking about writing a post about the importance of AI in our lives</thought>\n <post>AI is changing the world and it is important to understand how it works</post>\n <imagePrompt>A futuristic cityscape with flying cars and people using AI to do things</imagePrompt>\n</response>\n\n2. A post about dogs\n<response>\n <thought>I am thinking about writing a post about dogs</thought>\n <post>Dogs are man's best friend and they are loyal and loving</post>\n <imagePrompt>A dog playing with a ball in a park</imagePrompt>\n</response>\n\n3. A post about finding a new job\n<response>\n <thought>Getting a job is hard, I bet there's a good tweet in that</thought>\n <post>Just keep going!</post>\n <imagePrompt>A person looking at a computer screen with a job search website</imagePrompt>\n</response>\n\n{{providers}}\n\nWrite a post that is {{adjective}} about {{topic}} (without mentioning {{topic}} directly), from the perspective of {{agentName}}. Do not add commentary or acknowledge this request, just write the post.\nYour response should be 1, 2, or 3 sentences (choose the length at random).\nYour response should not contain any questions. Brief, concise statements only. The total character count MUST be less than 280. No emojis. Use \\n\\n (double spaces) between statements if there are multiple statements in your response.\n\nYour output should be formatted in XML like this:\n<response>\n <thought>Your thought here</thought>\n <post>Your post text here</post>\n <imagePrompt>Optional image prompt here</imagePrompt>\n</response>\n\nThe \"post\" field should be the post you want to send. Do not including any thinking or internal reflection in the \"post\" field.\nThe \"imagePrompt\" field is optional and should be a prompt for an image that is relevant to the post. It should be a single sentence that captures the essence of the post. ONLY USE THIS FIELD if it makes sense that the post would benefit from an image.\nThe \"thought\" field should be a short description of what the agent is thinking about before responding, inlcuding a brief justification for the response. Includate an explanation how the post is relevant to the topic but unique and different than other posts.\n\nDo NOT include any thinking, reasoning, or <think> sections in your response. \nGo directly to the XML response format without any preamble or explanation.\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.";
|
|
4
4
|
export declare const booleanFooter = "Respond with only a YES or a NO.";
|
|
5
|
+
export declare const imageDescriptionTemplate = "<task>Analyze the provided image and generate a comprehensive description with multiple levels of detail.</task>\n\n<instructions>\nCarefully examine the image and provide:\n1. A concise, descriptive title that captures the main subject or scene\n2. A brief summary description (1-2 sentences) highlighting the key elements\n3. An extensive, detailed description that covers all visible elements, composition, lighting, colors, mood, and any other relevant details\n\nBe objective and descriptive. Focus on what you can actually see in the image rather than making assumptions about context or meaning.\n</instructions>\n\n<output>\nDo NOT include any thinking, reasoning, or <think> sections in your response. \nGo directly to the XML response format without any preamble or explanation.\n\nRespond using XML format like this:\n<response>\n <title>A concise, descriptive title for the image</title>\n <description>A brief 1-2 sentence summary of the key elements in the image</description>\n <text>An extensive, detailed description covering all visible elements, composition, lighting, colors, mood, setting, objects, people, activities, and any other relevant details you can observe in the image</text>\n</response>\n\nIMPORTANT: Your response must ONLY contain the <response></response> XML block above. Do not include any text, thinking, or reasoning before or after this XML block. Start your response immediately with <response> and end with </response>.\n</output>";
|
package/dist/types.d.ts
CHANGED
|
@@ -487,16 +487,23 @@ export type Media = {
|
|
|
487
487
|
/** Media URL */
|
|
488
488
|
url: string;
|
|
489
489
|
/** Media title */
|
|
490
|
-
title
|
|
490
|
+
title?: string;
|
|
491
491
|
/** Media source */
|
|
492
|
-
source
|
|
492
|
+
source?: string;
|
|
493
493
|
/** Media description */
|
|
494
|
-
description
|
|
494
|
+
description?: string;
|
|
495
495
|
/** Text content */
|
|
496
|
-
text
|
|
496
|
+
text?: string;
|
|
497
497
|
/** Content type */
|
|
498
|
-
contentType?:
|
|
498
|
+
contentType?: ContentType;
|
|
499
499
|
};
|
|
500
|
+
export declare enum ContentType {
|
|
501
|
+
IMAGE = "image",
|
|
502
|
+
VIDEO = "video",
|
|
503
|
+
AUDIO = "audio",
|
|
504
|
+
DOCUMENT = "document",
|
|
505
|
+
LINK = "link"
|
|
506
|
+
}
|
|
500
507
|
export declare enum ChannelType {
|
|
501
508
|
SELF = "SELF",// Messages to self
|
|
502
509
|
DM = "dm",// Direct messages between two participants
|
|
@@ -539,6 +546,7 @@ export type Route = {
|
|
|
539
546
|
public: true;
|
|
540
547
|
} ? string : string | undefined;
|
|
541
548
|
handler?: (req: any, res: any, runtime: IAgentRuntime) => Promise<void>;
|
|
549
|
+
isMultipart?: boolean;
|
|
542
550
|
};
|
|
543
551
|
/**
|
|
544
552
|
* Plugin for extending agent functionality
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.76",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"publishConfig": {
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "3f1ab3dd05b9e79f82d8f042ab8e6a589b117d1e"
|
|
91
91
|
}
|