Interface ResponseConsumer


public interface ResponseConsumer
A consumer of ChatGPT reponses. Useful for giving immediate feedback to the users meanwhile the messages of the whole answer are coming from ChatGPT
Since:
8.9.4
Author:
Marco Meschieri - LogicalDOC
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    completed(String completeContent)
    Invoked when the whole message has been processed
    void
    consume(String content)
    Invoked when a new partial message has arrived
  • Method Details

    • consume

      void consume(String content)
      Invoked when a new partial message has arrived
      Parameters:
      content - the partial content of the whole answer
    • completed

      void completed(String completeContent)
      Invoked when the whole message has been processed
      Parameters:
      completeContent - the complete content of the whole answer