A partire dal 29 aprile 2025, i modelli Gemini 1.5 Pro e Gemini 1.5 Flash non sono disponibili nei progetti che non li hanno mai utilizzati, inclusi i nuovi progetti. Per maggiori dettagli, vedi Versioni e ciclo di vita dei modelli.
Classe PredictionServiceGrpc.PredictionServiceBlockStub (1.3.0)
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
public static final class PredictionServiceGrpc.PredictionServiceBlockingStub extends AbstractBlockingStub<PredictionServiceGrpc.PredictionServiceBlockingStub>
Uno stub per consentire ai client di effettuare chiamate RPC sincrone al servizio PredictionService.
public ExplainResponse explain(ExplainRequest request)
Eseguire una spiegazione online.
Se viene specificato deployed_model_id, per il modello DeployModel corrispondente deve essere compilato
explanation_spec. Se deployed_model_id non è specificato, per tutti i DeployedModel deve essere compilato
explanation_spec.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2024-05-17 UTC."],[],[],null,["# Class PredictionServiceGrpc.PredictionServiceBlockingStub (1.32.0)\n\n public static final class PredictionServiceGrpc.PredictionServiceBlockingStub extends AbstractBlockingStub\u003cPredictionServiceGrpc.PredictionServiceBlockingStub\u003e\n\nA stub to allow clients to do limited synchronous rpc calls to service PredictionService.\n\nA service for online predictions and explanations. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e io.grpc.stub.AbstractStub \\\u003e io.grpc.stub.AbstractBlockingStub \\\u003e PredictionServiceGrpc.PredictionServiceBlockingStub \n\nInherited Members\n-----------------\n\nio.grpc.stub.AbstractBlockingStub.\\\u003cT\\\u003enewStub(io.grpc.stub.AbstractStub.StubFactory\\\u003cT\\\u003e,io.grpc.Channel) \nio.grpc.stub.AbstractBlockingStub.\\\u003cT\\\u003enewStub(io.grpc.stub.AbstractStub.StubFactory\\\u003cT\\\u003e,io.grpc.Channel,io.grpc.CallOptions) \nio.grpc.stub.AbstractStub.\\\u003cT\\\u003ewithOption(io.grpc.CallOptions.Key\\\u003cT\\\u003e,T) \nio.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions) \nio.grpc.stub.AbstractStub.getCallOptions() \nio.grpc.stub.AbstractStub.getChannel() \nio.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials) \nio.grpc.stub.AbstractStub.withChannel(io.grpc.Channel) \nio.grpc.stub.AbstractStub.withCompression(java.lang.String) \nio.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline) \nio.grpc.stub.AbstractStub.withDeadlineAfter(java.time.Duration) \nio.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit) \nio.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor) \nio.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...) \nio.grpc.stub.AbstractStub.withMaxInboundMessageSize(int) \nio.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int) \nio.grpc.stub.AbstractStub.withOnReadyThreshold(int) \nio.grpc.stub.AbstractStub.withWaitForReady() \n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nMethods\n-------\n\n### build(Channel channel, CallOptions callOptions)\n\n protected PredictionServiceGrpc.PredictionServiceBlockingStub build(Channel channel, CallOptions callOptions)\n\n**Overrides** \nio.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)\n\n### directPredict(DirectPredictRequest request)\n\n public DirectPredictResponse directPredict(DirectPredictRequest request)\n\nPerform an unary online prediction request to a gRPC model server for\nVertex first-party products and frameworks.\n\n### directRawPredict(DirectRawPredictRequest request)\n\n public DirectRawPredictResponse directRawPredict(DirectRawPredictRequest request)\n\nPerform an unary online prediction request to a gRPC model server for\ncustom containers.\n\n### explain(ExplainRequest request)\n\n public ExplainResponse explain(ExplainRequest request)\n\nPerform an online explanation.\nIf\ndeployed_model_id\nis specified, the corresponding DeployModel must have\nexplanation_spec\npopulated. If\ndeployed_model_id\nis not specified, all DeployedModels must have\nexplanation_spec\npopulated.\n\n### generateContent(GenerateContentRequest request)\n\n public GenerateContentResponse generateContent(GenerateContentRequest request)\n\nGenerate content with multimodal inputs.\n\n### predict(PredictRequest request)\n\n public PredictResponse predict(PredictRequest request)\n\nPerform an online prediction.\n\n### rawPredict(RawPredictRequest request)\n\n public HttpBody rawPredict(RawPredictRequest request)\n\nPerform an online prediction with an arbitrary HTTP payload.\nThe response includes the following HTTP headers:\n\n- `X-Vertex-AI-Endpoint-Id`: ID of the Endpoint that served this prediction.\n- `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that served this prediction.\n\n### serverStreamingPredict(StreamingPredictRequest request)\n\n public Iterator\u003cStreamingPredictResponse\u003e serverStreamingPredict(StreamingPredictRequest request)\n\nPerform a server-side streaming online prediction request for Vertex\nLLM streaming.\n\n### streamGenerateContent(GenerateContentRequest request)\n\n public Iterator\u003cGenerateContentResponse\u003e streamGenerateContent(GenerateContentRequest request)\n\nGenerate content with multimodal inputs with streaming support.\n\n### streamRawPredict(StreamRawPredictRequest request)\n\n public Iterator\u003cHttpBody\u003e streamRawPredict(StreamRawPredictRequest request)\n\nPerform a streaming online prediction with an arbitrary HTTP payload."]]