• Resolved nedimo

    (@nedimo)


    Hi everyone, I need help on how to use discussion with public rest api? I have enabled discussion in settings but I dont know how to send previous messages. When I use chatId in body, I got error 500. This is my request:
    const response = await fetch(‘https://myaiengine.com/wp-json/mwai/v1/simpleChatbotQuery‘, { method: ‘POST’,
    headers: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer myBearer’ },
    body: JSON.stringify({ prompt: ‘Hi’, botId: ‘default’ })
    });

Viewing 1 replies (of 1 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @nedimo! 👋

    You don’t need to send the rest of the conversation manually. Simply set up a ChatId in the request parameters, and every new request will automatically be part of the same discussion.

    {
    "prompt": “Hello Nyao!",
    "botId": "default”,
    "chatId": “my_chat_01"
    }
Viewing 1 replies (of 1 total)

The topic ‘Discussion with Public Rest Api’ is closed to new replies.