create-message-kit 1.1.7-beta.10 → 1.1.7-beta.11

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-message-kit",
3
- "version": "1.1.7-beta.10",
3
+ "version": "1.1.7-beta.11",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -4,23 +4,15 @@ import { agent_prompt } from "./prompt.js";
4
4
  import { getUserInfo } from "@xmtp/message-kit";
5
5
 
6
6
  run(async (context: HandlerContext) => {
7
- /*All the skills are handled through the skills file*/
8
- /* If its just text, it will be handled by the ensAgent*/
9
- /* If its a group message, it will be handled by the groupAgent*/
10
- if (!process?.env?.OPEN_AI_API_KEY) {
11
- console.warn("No OPEN_AI_API_KEY found in .env");
12
- return;
13
- }
14
-
15
7
  const {
16
8
  message: {
17
- content: { content, params },
9
+ content: { text, params },
18
10
  sender,
19
11
  },
20
12
  } = context;
21
13
 
22
14
  try {
23
- let userPrompt = params?.prompt ?? content;
15
+ let userPrompt = params?.prompt ?? text;
24
16
  const userInfo = await getUserInfo(sender.address);
25
17
  if (!userInfo) {
26
18
  console.log("User info not found");
@@ -2,11 +2,6 @@ import { HandlerContext, AbstractedMember } from "@xmtp/message-kit";
2
2
  import { textGeneration } from "@xmtp/message-kit";
3
3
 
4
4
  export async function handler(context: HandlerContext) {
5
- if (!process?.env?.OPEN_AI_API_KEY) {
6
- console.warn("No OPEN_AI_API_KEY found in .env");
7
- return;
8
- }
9
-
10
5
  const {
11
6
  message: {
12
7
  sender,