Interface ChatModelListener
-
- All Implemented Interfaces:
public interface ChatModelListenerA ChatLanguageModel listener that listens for requests, responses and errors.
-
-
Method Summary
Modifier and Type Method Description voidonRequest(ChatModelRequestContext requestContext)This method is called before the request is sent to the model. voidonResponse(ChatModelResponseContext responseContext)This method is called after the response is received from the model. voidonError(ChatModelErrorContext errorContext)This method is called when an error occurs during interaction with the model. -
-
Method Detail
-
onRequest
void onRequest(ChatModelRequestContext requestContext)
This method is called before the request is sent to the model.
- Parameters:
requestContext- The request context.
-
onResponse
void onResponse(ChatModelResponseContext responseContext)
This method is called after the response is received from the model.
- Parameters:
responseContext- The response context.
-
onError
void onError(ChatModelErrorContext errorContext)
This method is called when an error occurs during interaction with the model.
- Parameters:
errorContext- The error context.
-
-
-
-