Interface RuntimeServiceAsync
-
- All Implemented Interfaces:
public interface RuntimeServiceAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRuntimeServiceAsync.WithRawResponseA view of RuntimeServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
-
-
Method Detail
-
withRawResponse
abstract RuntimeServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract RuntimeServiceAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
evaluateRequest
CompletableFuture<RuntimeEvaluateRequestResponse> evaluateRequest(RuntimeEvaluateRequestParams params)
BETA This endpoint is not GA or Production ready and is subject to changes at any time. Breaking changes may occur.
Analyzes an LLM request payload for security threats before it is sent to the model.
Accepts any valid provider request payload and returns:
If detect or redact action: the request payload (potentially modified) in the provider's request format
If block action: a canned block message in the provider's response format
Use this endpoint inline in your LLM pipeline to evaluate prompts before they reach the model.
Supported provider formats:
-
evaluateRequest
abstract CompletableFuture<RuntimeEvaluateRequestResponse> evaluateRequest(RuntimeEvaluateRequestParams params, RequestOptions requestOptions)
-
evaluateRequest
CompletableFuture<RuntimeEvaluateRequestResponse> evaluateRequest(RuntimeEvaluateRequestParams.Body body, RequestOptions requestOptions)
-
evaluateRequest
CompletableFuture<RuntimeEvaluateRequestResponse> evaluateRequest(RuntimeEvaluateRequestParams.Body body)
-
evaluateResponse
CompletableFuture<RuntimeEvaluateResponseResponse> evaluateResponse(RuntimeEvaluateResponseParams params)
BETA This endpoint is not GA or Production ready and is subject to changes at any time. Breaking changes may occur.
Analyzes an LLM response payload for security threats after it is received from the model.
Accepts any valid provider response payload and returns:
If detect or redact action: the response payload (potentially modified) in the provider's response format
If block action: a canned block message in the provider's response format
Use this endpoint inline in your LLM pipeline to evaluate model outputs before returning them to users.
Supported provider formats:
-
evaluateResponse
abstract CompletableFuture<RuntimeEvaluateResponseResponse> evaluateResponse(RuntimeEvaluateResponseParams params, RequestOptions requestOptions)
-
evaluateResponse
CompletableFuture<RuntimeEvaluateResponseResponse> evaluateResponse(RuntimeEvaluateResponseParams.Body body, RequestOptions requestOptions)
-
evaluateResponse
CompletableFuture<RuntimeEvaluateResponseResponse> evaluateResponse(RuntimeEvaluateResponseParams.Body body)
-
-
-
-