Interface EmbeddingModelListener
An
EmbeddingModel listener that listens for requests, responses and errors.- Since:
- 1.11.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonError(EmbeddingModelErrorContext errorContext) This method is called when an error occurs during interaction with the embedding model.default voidonRequest(EmbeddingModelRequestContext requestContext) This method is called before the request is executed against the embedding model.default voidonResponse(EmbeddingModelResponseContext responseContext) This method is called after a successful embedding operation completes.
-
Method Details
-
onRequest
This method is called before the request is executed against the embedding model.- Parameters:
requestContext- The request context. It contains the input and attributes. The attributes can be used to pass data between methods of this listener or between multiple listeners.
-
onResponse
This method is called after a successful embedding operation completes.- Parameters:
responseContext- The response context. It contains the response, corresponding request and attributes. The attributes can be used to pass data between methods of this listener or between multiple listeners.
-
onError
This method is called when an error occurs during interaction with the embedding model.- Parameters:
errorContext- The error context. It contains the error, corresponding request and attributes. The attributes can be used to pass data between methods of this listener or between multiple listeners.
-