Class HiddenLayerClientAsyncImpl
-
- All Implemented Interfaces:
-
com.hiddenlayer.api.client.HiddenLayerClientAsync
public final class HiddenLayerClientAsyncImpl implements HiddenLayerClientAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classHiddenLayerClientAsyncImpl.WithRawResponseImpl
-
Constructor Summary
Constructors Constructor Description HiddenLayerClientAsyncImpl(ClientOptions clientOptions)
-
Method Summary
Modifier and Type Method Description HiddenLayerClientsync()Returns a version of this client that uses synchronous execution. HiddenLayerClientAsync.WithRawResponsewithRawResponse()Returns a view of this service that provides access to raw HTTP responses for each method. HiddenLayerClientAsyncwithOptions(Consumer<ClientOptions.Builder> modifier)Returns a view of this service with the given option modifications applied. ModelServiceAsyncmodels()PromptAnalyzerServiceAsyncpromptAnalyzer()InteractionServiceAsyncinteractions()SensorServiceAsyncsensors()ScanServiceAsyncscans()AsyncCommunityScannercommunityScanner()Async community scanner that provides the communityScan method with polling functionality. AsyncModelScannermodelScanner()Model scanner that provides file and folder scanning functionality. Unitclose()Closes this client, relinquishing any underlying resources. -
-
Constructor Detail
-
HiddenLayerClientAsyncImpl
HiddenLayerClientAsyncImpl(ClientOptions clientOptions)
-
-
Method Detail
-
sync
HiddenLayerClient sync()
Returns a version of this client that uses synchronous execution.
The returned client shares its resources, like its connection pool and thread pools, with this client.
-
withRawResponse
HiddenLayerClientAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
HiddenLayerClientAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
models
ModelServiceAsync models()
-
promptAnalyzer
PromptAnalyzerServiceAsync promptAnalyzer()
-
interactions
InteractionServiceAsync interactions()
-
sensors
SensorServiceAsync sensors()
-
scans
ScanServiceAsync scans()
-
communityScanner
AsyncCommunityScanner communityScanner()
Async community scanner that provides the communityScan method with polling functionality.
This extends the generated SDK to provide the same functionality as the old SDK's communityScan method, which initiates a scan and optionally waits for results.
-
modelScanner
AsyncModelScanner modelScanner()
Model scanner that provides file and folder scanning functionality.
This extends the generated SDK to provide async versions of all model scanning functionality including file and folder scanning with multipart upload functionality.
-
close
Unit close()
Closes this client, relinquishing any underlying resources.
This is purposefully not inherited from AutoCloseable because the client is long-lived and usually should not be synchronously closed via try-with-resources.
It's also usually not necessary to call this method at all. the default HTTP client automatically releases threads and connections if they remain idle, but if you are writing an application that needs to aggressively release unused resources, then you may call this method.
-
-
-
-