Support multiple functions per pluging
Support multiple functions per plugin. This would avoid having to create/support a large number of plugins. It appears that OpenAI supports this (see https://openai.com/blog/function-calling-and-other-api-updates > Example in Step). But if you try to define an array for the function in TM, then you get an error.
Log in to comment and vote
Comments5
Sapphire Horizon
Dec 31, 2024
Yeah, I just ran into this limitation myself. I was thinking that a temporary workaround for this is to specify a property that that instructs the called function which other functions should be called.
E.G.
async function menu(params, userSettings) {
const { action } = params;
switch(action) {
case "get": fn_get(params, userSettings); break;case "put" : { fn_put(params, userSettings); break;}
}
function fn_get(params, userSettings) {
}
function fn_put(params, userSettings) {
}
Mar 2, 2024
Ngoc Nguyen
Feb 27, 2024
is this what you're looking for: https://twitter.com/TypingMindApp/status/1726688360796721330?
Violet Marker
Feb 27, 2024
Ngoc Nguyen unfortunately no. In the definition of one plugin, i want to specify several JS functions (instead of creating a plugin for each function)
Ngoc Nguyen
Feb 28, 2024
Marc Bernard: oh i see. Thank you for clarifying 😊