🤖 memory-lancedb: avoid plugin-sdk enum helper in local TypeBox schema (#13897)
This commit is contained in:
parent
80b56cabc2
commit
aade133978
@ -11,7 +11,6 @@ import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|||||||
import { Type } from "@sinclair/typebox";
|
import { Type } from "@sinclair/typebox";
|
||||||
import { randomUUID } from "node:crypto";
|
import { randomUUID } from "node:crypto";
|
||||||
import OpenAI from "openai";
|
import OpenAI from "openai";
|
||||||
import { stringEnum } from "openclaw/plugin-sdk";
|
|
||||||
import {
|
import {
|
||||||
MEMORY_CATEGORIES,
|
MEMORY_CATEGORIES,
|
||||||
type MemoryCategory,
|
type MemoryCategory,
|
||||||
@ -317,7 +316,12 @@ const memoryPlugin = {
|
|||||||
parameters: Type.Object({
|
parameters: Type.Object({
|
||||||
text: Type.String({ description: "Information to remember" }),
|
text: Type.String({ description: "Information to remember" }),
|
||||||
importance: Type.Optional(Type.Number({ description: "Importance 0-1 (default: 0.7)" })),
|
importance: Type.Optional(Type.Number({ description: "Importance 0-1 (default: 0.7)" })),
|
||||||
category: Type.Optional(stringEnum(MEMORY_CATEGORIES)),
|
category: Type.Optional(
|
||||||
|
Type.Unsafe<MemoryCategory>({
|
||||||
|
type: "string",
|
||||||
|
enum: [...MEMORY_CATEGORIES],
|
||||||
|
}),
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
async execute(_toolCallId, params) {
|
async execute(_toolCallId, params) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user