Debian Codegraph @

aiplatform/apiv1/aiplatformpb/vertex_rag_service_grpc.pb.go

raw symbols SCIP
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
16 // versions:
17 // - protoc-gen-go-grpc v1.3.0
18 // - protoc v4.25.7
19 // source: google/cloud/aiplatform/v1/vertex_rag_service.proto
20
21 package aiplatformpb
22
23 import (
24 context "context"
25 grpc "google.golang.org/grpc"
26 codes "google.golang.org/grpc/codes"
27 status "google.golang.org/grpc/status"
28 )
29
30 // This is a compile-time assertion to ensure that this generated file
31 // is compatible with the grpc package it is being compiled against.
32 // Requires gRPC-Go v1.32.0 or later.
33 const _ = grpc.SupportPackageIsVersion7
34
35 const (
36 VertexRagService_RetrieveContexts_FullMethodName = "/google.cloud.aiplatform.v1.VertexRagService/RetrieveContexts"
37 VertexRagService_AugmentPrompt_FullMethodName = "/google.cloud.aiplatform.v1.VertexRagService/AugmentPrompt"
38 VertexRagService_CorroborateContent_FullMethodName = "/google.cloud.aiplatform.v1.VertexRagService/CorroborateContent"
39 )
40
41 // VertexRagServiceClient is the client API for VertexRagService service.
42 //
43 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
44 type VertexRagServiceClient interface {
45 // Retrieves relevant contexts for a query.
46 RetrieveContexts(ctx context.Context, in *RetrieveContextsRequest, opts ...grpc.CallOption) (*RetrieveContextsResponse, error)
47 // Given an input prompt, it returns augmented prompt from vertex rag store
48 //
49 // to guide LLM towards generating grounded responses.
50 AugmentPrompt(ctx context.Context, in *AugmentPromptRequest, opts ...grpc.CallOption) (*AugmentPromptResponse, error)
51 // Given an input text, it returns a score that evaluates the factuality of
52 // the text. It also extracts and returns claims from the text and provides
53 // supporting facts.
54 CorroborateContent(ctx context.Context, in *CorroborateContentRequest, opts ...grpc.CallOption) (*CorroborateContentResponse, error)
55 }
56
57 type vertexRagServiceClient struct {
58 cc grpc.ClientConnInterface
59 }
60
61 func NewVertexRagServiceClient(cc grpc.ClientConnInterface) VertexRagServiceClient {
62 return &vertexRagServiceClient{cc}
63 }
64
65 func (c *vertexRagServiceClient) RetrieveContexts(ctx context.Context, in *RetrieveContextsRequest, opts ...grpc.CallOption) (*RetrieveContextsResponse, error) {
66 out := new(RetrieveContextsResponse)
67 err := c.cc.Invoke(ctx, VertexRagService_RetrieveContexts_FullMethodName, in, out, opts...)
68 if err != nil {
69 return nil, err
70 }
71 return out, nil
72 }
73
74 func (c *vertexRagServiceClient) AugmentPrompt(ctx context.Context, in *AugmentPromptRequest, opts ...grpc.CallOption) (*AugmentPromptResponse, error) {
75 out := new(AugmentPromptResponse)
76 err := c.cc.Invoke(ctx, VertexRagService_AugmentPrompt_FullMethodName, in, out, opts...)
77 if err != nil {
78 return nil, err
79 }
80 return out, nil
81 }
82
83 func (c *vertexRagServiceClient) CorroborateContent(ctx context.Context, in *CorroborateContentRequest, opts ...grpc.CallOption) (*CorroborateContentResponse, error) {
84 out := new(CorroborateContentResponse)
85 err := c.cc.Invoke(ctx, VertexRagService_CorroborateContent_FullMethodName, in, out, opts...)
86 if err != nil {
87 return nil, err
88 }
89 return out, nil
90 }
91
92 // VertexRagServiceServer is the server API for VertexRagService service.
93 // All implementations should embed UnimplementedVertexRagServiceServer
94 // for forward compatibility
95 type VertexRagServiceServer interface {
96 // Retrieves relevant contexts for a query.
97 RetrieveContexts(context.Context, *RetrieveContextsRequest) (*RetrieveContextsResponse, error)
98 // Given an input prompt, it returns augmented prompt from vertex rag store
99 //
100 // to guide LLM towards generating grounded responses.
101 AugmentPrompt(context.Context, *AugmentPromptRequest) (*AugmentPromptResponse, error)
102 // Given an input text, it returns a score that evaluates the factuality of
103 // the text. It also extracts and returns claims from the text and provides
104 // supporting facts.
105 CorroborateContent(context.Context, *CorroborateContentRequest) (*CorroborateContentResponse, error)
106 }
107
108 // UnimplementedVertexRagServiceServer should be embedded to have forward compatible implementations.
109 type UnimplementedVertexRagServiceServer struct {
110 }
111
112 func (UnimplementedVertexRagServiceServer) RetrieveContexts(context.Context, *RetrieveContextsRequest) (*RetrieveContextsResponse, error) {
113 return nil, status.Errorf(codes.Unimplemented, "method RetrieveContexts not implemented")
114 }
115 func (UnimplementedVertexRagServiceServer) AugmentPrompt(context.Context, *AugmentPromptRequest) (*AugmentPromptResponse, error) {
116 return nil, status.Errorf(codes.Unimplemented, "method AugmentPrompt not implemented")
117 }
118 func (UnimplementedVertexRagServiceServer) CorroborateContent(context.Context, *CorroborateContentRequest) (*CorroborateContentResponse, error) {
119 return nil, status.Errorf(codes.Unimplemented, "method CorroborateContent not implemented")
120 }
121
122 // UnsafeVertexRagServiceServer may be embedded to opt out of forward compatibility for this service.
123 // Use of this interface is not recommended, as added methods to VertexRagServiceServer will
124 // result in compilation errors.
125 type UnsafeVertexRagServiceServer interface {
126 mustEmbedUnimplementedVertexRagServiceServer()
127 }
128
129 func RegisterVertexRagServiceServer(s grpc.ServiceRegistrar, srv VertexRagServiceServer) {
130 s.RegisterService(&VertexRagService_ServiceDesc, srv)
131 }
132
133 func _VertexRagService_RetrieveContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
134 in := new(RetrieveContextsRequest)
135 if err := dec(in); err != nil {
136 return nil, err
137 }
138 if interceptor == nil {
139 return srv.(VertexRagServiceServer).RetrieveContexts(ctx, in)
140 }
141 info := &grpc.UnaryServerInfo{
142 Server: srv,
143 FullMethod: VertexRagService_RetrieveContexts_FullMethodName,
144 }
145 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
146 return srv.(VertexRagServiceServer).RetrieveContexts(ctx, req.(*RetrieveContextsRequest))
147 }
148 return interceptor(ctx, in, info, handler)
149 }
150
151 func _VertexRagService_AugmentPrompt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
152 in := new(AugmentPromptRequest)
153 if err := dec(in); err != nil {
154 return nil, err
155 }
156 if interceptor == nil {
157 return srv.(VertexRagServiceServer).AugmentPrompt(ctx, in)
158 }
159 info := &grpc.UnaryServerInfo{
160 Server: srv,
161 FullMethod: VertexRagService_AugmentPrompt_FullMethodName,
162 }
163 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
164 return srv.(VertexRagServiceServer).AugmentPrompt(ctx, req.(*AugmentPromptRequest))
165 }
166 return interceptor(ctx, in, info, handler)
167 }
168
169 func _VertexRagService_CorroborateContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
170 in := new(CorroborateContentRequest)
171 if err := dec(in); err != nil {
172 return nil, err
173 }
174 if interceptor == nil {
175 return srv.(VertexRagServiceServer).CorroborateContent(ctx, in)
176 }
177 info := &grpc.UnaryServerInfo{
178 Server: srv,
179 FullMethod: VertexRagService_CorroborateContent_FullMethodName,
180 }
181 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
182 return srv.(VertexRagServiceServer).CorroborateContent(ctx, req.(*CorroborateContentRequest))
183 }
184 return interceptor(ctx, in, info, handler)
185 }
186
187 // VertexRagService_ServiceDesc is the grpc.ServiceDesc for VertexRagService service.
188 // It's only intended for direct use with grpc.RegisterService,
189 // and not to be introspected or modified (even as a copy)
190 var VertexRagService_ServiceDesc = grpc.ServiceDesc{
191 ServiceName: "google.cloud.aiplatform.v1.VertexRagService",
192 HandlerType: (*VertexRagServiceServer)(nil),
193 Methods: []grpc.MethodDesc{
194 {
195 MethodName: "RetrieveContexts",
196 Handler: _VertexRagService_RetrieveContexts_Handler,
197 },
198 {
199 MethodName: "AugmentPrompt",
200 Handler: _VertexRagService_AugmentPrompt_Handler,
201 },
202 {
203 MethodName: "CorroborateContent",
204 Handler: _VertexRagService_CorroborateContent_Handler,
205 },
206 },
207 Streams: []grpc.StreamDesc{},
208 Metadata: "google/cloud/aiplatform/v1/vertex_rag_service.proto",
209 }