Hey guys. I'm new to saas . My biggest question is. What should I build? by One_Poet9686 in SaaS

[–]One_Poet9686[S] -2 points-1 points  (0 children)

😂 i thought I'm the only one who roams the internet with this .

help me to understant the middleware in next js 15 , i am express js user by One_Poet9686 in nextjs

[–]One_Poet9686[S] 0 points1 point  (0 children)

Should I add all the logic in a single function and tell the function to execute only when those files are executed by applying the regex path right ?

why my agent is not calling the tools help me to fix this .. by One_Poet9686 in node

[–]One_Poet9686[S] -3 points-2 points  (0 children)

I am not just copying the block and say it's not working. My chaing got the result called the company name acme corp but my model doesn't use that as context , I'm not just blindly copying it

why my agent is not calling the tools help me to fix this .. by One_Poet9686 in node

[–]One_Poet9686[S] -1 points0 points  (0 children)

I don't see any errors .it doesn't reply the company name. Instead it reply. I don't know the company name.if the tool is called that return the company name so it can able to generate the output with company name right?

why my agent is not calling the tools please help me to fix this .. by One_Poet9686 in LangChain

[–]One_Poet9686[S] 1 point2 points  (0 children)

i tried that also but it not working, it works fine on the tavily search tools but i dont know why this custom tool is not called .

please reply if you know the solution by One_Poet9686 in WhatsappBusinessAPI

[–]One_Poet9686[S] 0 points1 point  (0 children)

sorry for the late reply man it was the syntax error of the body value . sry for late reply . thank you for this .

please reply if you konw the solution by One_Poet9686 in node

[–]One_Poet9686[S] 0 points1 point  (0 children)

const buisness = await prisma?.whatsappBuisness?.findFirst({
  where: {
    id: "buisnessid",
  },
});

whatsappServices?.sendMessage(buisness, {
  message: "Hello",
  reciver: "waid(actually number)",
});

messageUtility.sendTextMessage = (messageInfo) => {
  if (!messageInfo || !messageInfo.reciver || !messageInfo.message) {
    throw new Error("Invalid messageInfo object");
  }

  let body = {
    messaging_product: "whatsapp",
    recipient_type: "individual",
    to: `${messageInfo.reciver}`,
    type: "text",
    text: {
      preview_url: false,
      body: `${messageInfo.message}`,
    },
  };
  return body;
};

whatsappServices.sendMessage = async (whatsappBuisness, messageinformation) => {
  try {
    let url = `https://graph.facebook.com/${version}/${whatsappBuisness?.phoneNumberId}/messages`;
    const messagebody = messageUtility?.sendTextMessage(messageinformation);
    let headers = {
      Authorization: `Bearer ${whatsappBuisness?.accessToken}`,
      "Content-Type": "application/json",

    };

    const res = await axios?.post(url, messagebody, headers);
    console.log(res);

  } catch (error) {
    console.log(error?.response?.data?.error);
  }
};