Interface GPTCompletionCallback

    • Method Detail

      • onNext

        void onNext​(String chars)
        Called when a couple of characters come in.
      • onError

        void onError​(Throwable throwable)
        Called when an error occurs.
      • setLoggingId

        void setLoggingId​(String loggingId)
        For debugging: this sets the internal ID that is used for logging purposes. Not a good ID give to the world, though.
      • setRequest

        default void setRequest​(String json)
        For debugging - the request that was sent to ChatGPT as JSON.
      • close

        default void close()
        Notifies that the request is completely finished / closed, nothing more will arrive.
      • toolDelta

        default void toolDelta​(List<GPTToolCall> toolCalls)
        Called when a tool call is made.