From df2c235e3fa8d528b15e87441c678bb1cbbfa56a Mon Sep 17 00:00:00 2001 From: conache Date: Tue, 7 Jan 2025 13:33:25 +0200 Subject: [PATCH] Use topic id as number --- packages/plugin-allora/src/actions/getInference.ts | 2 +- packages/plugin-allora/src/templates/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-allora/src/actions/getInference.ts b/packages/plugin-allora/src/actions/getInference.ts index a3bfd8ffdf..92587d7ac3 100644 --- a/packages/plugin-allora/src/actions/getInference.ts +++ b/packages/plugin-allora/src/actions/getInference.ts @@ -57,7 +57,7 @@ export const getInferenceAction: Action = { // Define the schema for extracting the inference fields const schema = z.object({ - topicId: z.string().nullable(), + topicId: z.number().nullable(), topicName: z.string().nullable(), }); diff --git a/packages/plugin-allora/src/templates/index.ts b/packages/plugin-allora/src/templates/index.ts index 782dd6b090..b234009526 100644 --- a/packages/plugin-allora/src/templates/index.ts +++ b/packages/plugin-allora/src/templates/index.ts @@ -2,7 +2,7 @@ export const getInferenceTemplate = `Respond with a JSON markdown block containi Example response: \`\`\`json { - "topicId": "1", + "topicId": 1, "topicName": "Topic Name", } \`\`\` @@ -22,7 +22,7 @@ If the topic is not active or the prediction timeframe is not matching the user' Respond with a JSON markdown block containing only the extracted values. Use null for any values that cannot be determined. The result should be a valid JSON object with the following schema: \`\`\`json { - "topicId": string | null, + "topicId": number | null, "topicName": string | null, } \`\`\``;