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

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/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.12",
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");
@@ -13,9 +13,7 @@
13
13
  "openai": "^4.52.0"
14
14
  },
15
15
  "devDependencies": {
16
- "@types/node": "^20.14.2",
17
- "nodemon": "^3.1.3",
18
- "typescript": "^5.4.5"
16
+ "nodemon": "^3.1.3"
19
17
  },
20
18
  "engines": {
21
19
  "node": ">=20"
@@ -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,