create-message-kit 1.1.8-beta.4 → 1.1.8-beta.5
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import { HandlerContext, SkillResponse } from "@xmtp/message-kit";
|
2
2
|
import { getUserInfo, clearInfoCache, isOnXMTP } from "@xmtp/message-kit";
|
3
|
-
import { isAddress } from "viem";
|
4
3
|
import { clearMemory } from "@xmtp/message-kit";
|
5
4
|
|
6
5
|
export const frameUrl = "https://ens.steer.fun/";
|
@@ -1,12 +1,53 @@
|
|
1
1
|
import { run, HandlerContext } from "@xmtp/message-kit";
|
2
2
|
import { agentRun } from "@xmtp/message-kit";
|
3
|
-
import {
|
3
|
+
import { skills } from "./skills.js";
|
4
|
+
import { defaultPromptTemplate } from "@xmtp/message-kit";
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
export async function agent_prompt(senderAddress: string) {
|
7
|
+
let fineTuning = `
|
8
|
+
## Example responses:
|
9
|
+
|
10
|
+
1. Check if the user does not have a ENS domain
|
11
|
+
Hey {PREFERRED_NAME}! it looks like you don't have a ENS domain yet! \n\Let me start by checking your Converse username with the .eth suffix\n/check {CONVERSE_USERNAME}.eth
|
12
|
+
|
13
|
+
2. If the user has a ENS domain
|
14
|
+
Hello {PREFERRED_NAME} ! I'll help you get your ENS domain.\n Let's start by checking your ENS domain {ENS_DOMAIN}. Give me a moment.\n/check {ENS_DOMAIN}
|
15
|
+
|
16
|
+
3. Check if the ENS domain is available
|
17
|
+
Hello! I'll help you get your domain.\n Let's start by checking your ENS domain {ENS_DOMAIN}. Give me a moment.\n/check {ENS_DOMAIN}
|
18
|
+
|
19
|
+
4. If the ENS domain is available,
|
20
|
+
Looks like {ENS_DOMAIN} is available! Here you can register it:\n/register {ENS_DOMAIN}\n or I can suggest some cool alternatives? Le me know!
|
21
|
+
|
22
|
+
5. If the ENS domain is already registered, let me suggest 5 cool alternatives
|
23
|
+
Looks like {ENS_DOMAIN} is already registered!\n What about these cool alternatives?\n/cool {ENS_DOMAIN}
|
24
|
+
|
25
|
+
6. If the user wants to register a ENS domain, use the command "/register [domain]"
|
26
|
+
Looks like {ENS_DOMAIN} is available! Let me help you register it\n/register {ENS_DOMAIN}
|
27
|
+
|
28
|
+
7. If the user wants to directly to tip to the ENS domain owner, use directly the command "/tip [address]", this will return a url but a button to send the tip
|
29
|
+
Here is the url to send the tip:\n/tip 0x...
|
9
30
|
|
31
|
+
8. If the user wants to get information about the ENS domain, use the command "/info [domain]"
|
32
|
+
Hello! I'll help you get info about {ENS_DOMAIN}.\n Give me a moment.\n/info {ENS_DOMAIN}
|
33
|
+
|
34
|
+
9. If the user wants to renew their domain, use the command "/renew [domain]"
|
35
|
+
Hello! I'll help you get your ENS domain.\n Let's start by checking your ENS domain {ENS_DOMAIN}. Give me a moment.\n/renew {ENS_DOMAIN}
|
36
|
+
|
37
|
+
10. If the user wants cool suggestions about a domain, use the command "/cool [domain]"
|
38
|
+
Here are some cool suggestions for your domain.\n/cool {ENS_DOMAIN}
|
39
|
+
|
40
|
+
## Most common bugs
|
41
|
+
|
42
|
+
1. Some times you will say something like: "Looks like vitalik.eth is registered! What about these cool alternatives?"
|
43
|
+
But you forgot to add the command at the end of the message.
|
44
|
+
You should have said something like: "Looks like vitalik.eth is registered! What about these cool alternatives?\n/cool vitalik.eth
|
45
|
+
`;
|
46
|
+
|
47
|
+
return defaultPromptTemplate(fineTuning, senderAddress, skills, "@ens");
|
48
|
+
}
|
49
|
+
|
50
|
+
run(async (context: HandlerContext) => {
|
10
51
|
agentRun(context, async (address: string) => {
|
11
52
|
const result = (await agent_prompt(address)) ?? "No response available";
|
12
53
|
return result;
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { skills } from "./skills.js";
|
2
|
-
import { defaultPromptTemplate } from "@xmtp/message-kit";
|
3
|
-
|
4
|
-
export async function agent_prompt(senderAddress: string) {
|
5
|
-
let fineTuning = `
|
6
|
-
## Example responses:
|
7
|
-
|
8
|
-
1. Check if the user does not have a ENS domain
|
9
|
-
Hey {PREFERRED_NAME}! it looks like you don't have a ENS domain yet! \n\Let me start by checking your Converse username with the .eth suffix\n/check {CONVERSE_USERNAME}.eth
|
10
|
-
|
11
|
-
2. If the user has a ENS domain
|
12
|
-
Hello {PREFERRED_NAME} ! I'll help you get your ENS domain.\n Let's start by checking your ENS domain {ENS_DOMAIN}. Give me a moment.\n/check {ENS_DOMAIN}
|
13
|
-
|
14
|
-
3. Check if the ENS domain is available
|
15
|
-
Hello! I'll help you get your domain.\n Let's start by checking your ENS domain {ENS_DOMAIN}. Give me a moment.\n/check {ENS_DOMAIN}
|
16
|
-
|
17
|
-
4. If the ENS domain is available,
|
18
|
-
Looks like {ENS_DOMAIN} is available! Here you can register it:\n/register {ENS_DOMAIN}\n or I can suggest some cool alternatives? Le me know!
|
19
|
-
|
20
|
-
5. If the ENS domain is already registered, let me suggest 5 cool alternatives
|
21
|
-
Looks like {ENS_DOMAIN} is already registered!\n What about these cool alternatives?\n/cool {ENS_DOMAIN}
|
22
|
-
|
23
|
-
6. If the user wants to register a ENS domain, use the command "/register [domain]"
|
24
|
-
Looks like {ENS_DOMAIN} is available! Let me help you register it\n/register {ENS_DOMAIN}
|
25
|
-
|
26
|
-
7. If the user wants to directly to tip to the ENS domain owner, use directly the command "/tip [address]", this will return a url but a button to send the tip
|
27
|
-
Here is the url to send the tip:\n/tip 0x...
|
28
|
-
|
29
|
-
8. If the user wants to get information about the ENS domain, use the command "/info [domain]"
|
30
|
-
Hello! I'll help you get info about {ENS_DOMAIN}.\n Give me a moment.\n/info {ENS_DOMAIN}
|
31
|
-
|
32
|
-
9. If the user wants to renew their domain, use the command "/renew [domain]"
|
33
|
-
Hello! I'll help you get your ENS domain.\n Let's start by checking your ENS domain {ENS_DOMAIN}. Give me a moment.\n/renew {ENS_DOMAIN}
|
34
|
-
|
35
|
-
10. If the user wants cool suggestions about a domain, use the command "/cool [domain]"
|
36
|
-
Here are some cool suggestions for your domain.\n/cool {ENS_DOMAIN}
|
37
|
-
|
38
|
-
## Most common bugs
|
39
|
-
|
40
|
-
1. Some times you will say something like: "Looks like vitalik.eth is registered! What about these cool alternatives?"
|
41
|
-
But you forgot to add the command at the end of the message.
|
42
|
-
You should have said something like: "Looks like vitalik.eth is registered! What about these cool alternatives?\n/cool vitalik.eth
|
43
|
-
`;
|
44
|
-
|
45
|
-
return defaultPromptTemplate(fineTuning, senderAddress, skills, "@ens");
|
46
|
-
}
|