Add generate image tool

This commit is contained in:
Aslan 2026-01-23 11:46:23 -05:00
parent c3469c78e3
commit 7b364bce7d

View file

@ -121,6 +121,20 @@ const tools: FunctionDeclaration[] = [
required: [],
},
},
{
name: "generateImage",
description: "Generates an image or a picture based on the prompt",
parametersJsonSchema: {
type: "object",
properties: {
prompt: {
type: "string",
description: "a very detailed prompt to generate an image",
},
},
required: ["prompt"],
},
},
];
const toolFunctions: AIToolFunction[] = [
@ -276,6 +290,16 @@ const toolFunctions: AIToolFunction[] = [
};
},
},
{
name: "generateImage",
function: (matrix, args) => {
matrix.client.sendTextMessage(matrix.roomId, `!img ${args.prompt}`);
return {
message: "trying to generate...",
};
},
},
];
export { tools, toolFunctions };