| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 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 |
|
| 31 |
|
| 32 |
|
| 33 |
const _ = grpc.SupportPackageIsVersion7 |
| 34 |
|
| 35 |
const ( |
| 36 |
VertexRagService_RetrieveContexts_FullMethodName = "/google.cloud.aiplatform.v1beta1.VertexRagService/RetrieveContexts" |
| 37 |
VertexRagService_AugmentPrompt_FullMethodName = "/google.cloud.aiplatform.v1beta1.VertexRagService/AugmentPrompt" |
| 38 |
VertexRagService_CorroborateContent_FullMethodName = "/google.cloud.aiplatform.v1beta1.VertexRagService/CorroborateContent" |
| 39 |
) |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
type VertexRagServiceClient interface { |
| 45 |
|
| 46 |
RetrieveContexts(ctx context.Context, in *RetrieveContextsRequest, opts ...grpc.CallOption) (*RetrieveContextsResponse, error) |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
AugmentPrompt(ctx context.Context, in *AugmentPromptRequest, opts ...grpc.CallOption) (*AugmentPromptResponse, error) |
| 51 |
|
| 52 |
|
| 53 |
|
| 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 |
|
| 93 |
|
| 94 |
|
| 95 |
type VertexRagServiceServer interface { |
| 96 |
|
| 97 |
RetrieveContexts(context.Context, *RetrieveContextsRequest) (*RetrieveContextsResponse, error) |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
AugmentPrompt(context.Context, *AugmentPromptRequest) (*AugmentPromptResponse, error) |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
CorroborateContent(context.Context, *CorroborateContentRequest) (*CorroborateContentResponse, error) |
| 106 |
} |
| 107 |
|
| 108 |
|
| 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 |
|
| 123 |
|
| 124 |
|
| 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 |
|
| 188 |
|
| 189 |
|
| 190 |
var VertexRagService_ServiceDesc = grpc.ServiceDesc{ |
| 191 |
ServiceName: "google.cloud.aiplatform.v1beta1.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/v1beta1/vertex_rag_service.proto", |
| 209 |
} |