• Resolved smls

    (@smls)


    Hello. I need to track a JavaScript event when the chat returns the entire response ([CHATBOT STREAM] END:) in order to update the statistics block. Is there an event to which I can refer?

    Is there a description of js plugin events somewhere?

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

    (@valwa)

    Hey @smls !

    “Statistics” is a feature available in the Pro version of AI, since this forum is specifically for the free version of the plugin, I’m unable to provide further details.?

    Concerning the client side API you can read our documentation here. There is no Javascript event pushed at the time of stream end.

    Thanks for your understanding!???

    Thread Starter smls

    (@smls)

    Thank you, I understood you. We’ll have to use a workaround.

    function consoleInterceptor(data) {
    if (data.includes("[CHATBOT STREAM] END:")) {
    // Perform the necessary action
    }
    }
    
    const originalConsoleLog = console.log;
    console.log = function (...args) {
    originalConsoleLog.apply(this, args);
    consoleInterceptor(args.join(" "));
    };
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JavaScript events’ is closed to new replies.