error: {
message: "Invalid 'functions[23].name': string too long. Expected a string with maximum length 64, but got a string with length 69 instead.",
type: 'invalid_request_error',
param: 'functions[23].name',
code: 'string_above_max_length'
},
code: 'string_above_max_length',
param: 'functions[23].name',
type: 'invalid_request_error',
attemptNumber: 1,
retriesLeft: 6
import { LangchainToolSet } from "composio-core";
import { createOpenAIFunctionsAgent } from "langchain/agents";
import { AgentExecutor } from "langchain/agents";
import { pull } from "langchain/hub";
import WebSocket from 'ws';
export const executeRequest = async (appName: any, userPrompt: any) => {
const toolset = new LangchainToolSet();
const llm = new ChatOpenAI();
const connection = await toolset.connectedAccounts.initiate({ appName: appName })
console.log(`Open this URL to authenticate: ${connection.redirectUrl}`);
const tools = await toolset.getTools({ apps: [appName] });
const prompt = await pull(
"hwchase17/openai-functions-agent"
);
const agent = await createOpenAIFunctionsAgent({
llm,
tools: tools,
prompt: prompt as any,
});
const agentExecutor = new AgentExecutor({ agent, tools, verbose: true });
const response = await agentExecutor.invoke({ input: userPrompt });
console.log(response);
return response;
}```, this is the code I am using from the docs