diff --git a/gen/go/gateway/v1/gateway.pb.go b/gen/go/gateway/v1/gateway.pb.go index 00fcc5ec..72d9a9ac 100644 --- a/gen/go/gateway/v1/gateway.pb.go +++ b/gen/go/gateway/v1/gateway.pb.go @@ -340,10 +340,11 @@ var file_gateway_v1_gateway_proto_rawDesc = []byte{ 0x6d, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x30, 0x01, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x2d, 0x61, 0x69, 0x2f, 0x6d, 0x6f, - 0x6e, 0x6f, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, - 0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x30, 0x01, 0x42, 0x42, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x6d, + 0x69, 0x6e, 0x64, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x2d, + 0x61, 0x69, 0x2f, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x65, 0x70, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, + 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/kt/gateway/v1/APIGatewayServiceGrpc.java b/gen/kt/com/basemind/client/APIGatewayServiceGrpc.java similarity index 72% rename from gen/kt/gateway/v1/APIGatewayServiceGrpc.java rename to gen/kt/com/basemind/client/APIGatewayServiceGrpc.java index 2cbb9ab5..2b6e61e5 100644 --- a/gen/kt/gateway/v1/APIGatewayServiceGrpc.java +++ b/gen/kt/com/basemind/client/APIGatewayServiceGrpc.java @@ -1,4 +1,4 @@ -package gateway.v1; +package com.basemind.client; import static io.grpc.MethodDescriptor.generateFullMethodName; @@ -18,29 +18,29 @@ private APIGatewayServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "gateway.v1.APIGatewayService"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getRequestPromptConfigMethod; + private static volatile io.grpc.MethodDescriptor getRequestPromptConfigMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RequestPromptConfig", - requestType = gateway.v1.Gateway.PromptConfigRequest.class, - responseType = gateway.v1.Gateway.PromptConfigResponse.class, + requestType = com.basemind.client.Gateway.PromptConfigRequest.class, + responseType = com.basemind.client.Gateway.PromptConfigResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRequestPromptConfigMethod() { - io.grpc.MethodDescriptor getRequestPromptConfigMethod; + public static io.grpc.MethodDescriptor getRequestPromptConfigMethod() { + io.grpc.MethodDescriptor getRequestPromptConfigMethod; if ((getRequestPromptConfigMethod = APIGatewayServiceGrpc.getRequestPromptConfigMethod) == null) { synchronized (APIGatewayServiceGrpc.class) { if ((getRequestPromptConfigMethod = APIGatewayServiceGrpc.getRequestPromptConfigMethod) == null) { APIGatewayServiceGrpc.getRequestPromptConfigMethod = getRequestPromptConfigMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RequestPromptConfig")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - gateway.v1.Gateway.PromptConfigRequest.getDefaultInstance())) + com.basemind.client.Gateway.PromptConfigRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - gateway.v1.Gateway.PromptConfigResponse.getDefaultInstance())) + com.basemind.client.Gateway.PromptConfigResponse.getDefaultInstance())) .setSchemaDescriptor(new APIGatewayServiceMethodDescriptorSupplier("RequestPromptConfig")) .build(); } @@ -49,29 +49,29 @@ gateway.v1.Gateway.PromptConfigResponse> getRequestPromptConfigMethod() { return getRequestPromptConfigMethod; } - private static volatile io.grpc.MethodDescriptor getRequestPromptMethod; + private static volatile io.grpc.MethodDescriptor getRequestPromptMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RequestPrompt", - requestType = gateway.v1.Gateway.PromptRequest.class, - responseType = gateway.v1.Gateway.PromptResponse.class, + requestType = com.basemind.client.Gateway.PromptRequest.class, + responseType = com.basemind.client.Gateway.PromptResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getRequestPromptMethod() { - io.grpc.MethodDescriptor getRequestPromptMethod; + public static io.grpc.MethodDescriptor getRequestPromptMethod() { + io.grpc.MethodDescriptor getRequestPromptMethod; if ((getRequestPromptMethod = APIGatewayServiceGrpc.getRequestPromptMethod) == null) { synchronized (APIGatewayServiceGrpc.class) { if ((getRequestPromptMethod = APIGatewayServiceGrpc.getRequestPromptMethod) == null) { APIGatewayServiceGrpc.getRequestPromptMethod = getRequestPromptMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RequestPrompt")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - gateway.v1.Gateway.PromptRequest.getDefaultInstance())) + com.basemind.client.Gateway.PromptRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - gateway.v1.Gateway.PromptResponse.getDefaultInstance())) + com.basemind.client.Gateway.PromptResponse.getDefaultInstance())) .setSchemaDescriptor(new APIGatewayServiceMethodDescriptorSupplier("RequestPrompt")) .build(); } @@ -80,29 +80,29 @@ gateway.v1.Gateway.PromptResponse> getRequestPromptMethod() { return getRequestPromptMethod; } - private static volatile io.grpc.MethodDescriptor getRequestStreamingPromptMethod; + private static volatile io.grpc.MethodDescriptor getRequestStreamingPromptMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "RequestStreamingPrompt", - requestType = gateway.v1.Gateway.PromptRequest.class, - responseType = gateway.v1.Gateway.StreamingPromptResponse.class, + requestType = com.basemind.client.Gateway.PromptRequest.class, + responseType = com.basemind.client.Gateway.StreamingPromptResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) - public static io.grpc.MethodDescriptor getRequestStreamingPromptMethod() { - io.grpc.MethodDescriptor getRequestStreamingPromptMethod; + public static io.grpc.MethodDescriptor getRequestStreamingPromptMethod() { + io.grpc.MethodDescriptor getRequestStreamingPromptMethod; if ((getRequestStreamingPromptMethod = APIGatewayServiceGrpc.getRequestStreamingPromptMethod) == null) { synchronized (APIGatewayServiceGrpc.class) { if ((getRequestStreamingPromptMethod = APIGatewayServiceGrpc.getRequestStreamingPromptMethod) == null) { APIGatewayServiceGrpc.getRequestStreamingPromptMethod = getRequestStreamingPromptMethod = - io.grpc.MethodDescriptor.newBuilder() + io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RequestStreamingPrompt")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - gateway.v1.Gateway.PromptRequest.getDefaultInstance())) + com.basemind.client.Gateway.PromptRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - gateway.v1.Gateway.StreamingPromptResponse.getDefaultInstance())) + com.basemind.client.Gateway.StreamingPromptResponse.getDefaultInstance())) .setSchemaDescriptor(new APIGatewayServiceMethodDescriptorSupplier("RequestStreamingPrompt")) .build(); } @@ -167,8 +167,8 @@ public interface AsyncService { * Request the configuration for making prompt requests * */ - default void requestPromptConfig(gateway.v1.Gateway.PromptConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { + default void requestPromptConfig(com.basemind.client.Gateway.PromptConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRequestPromptConfigMethod(), responseObserver); } @@ -177,8 +177,8 @@ default void requestPromptConfig(gateway.v1.Gateway.PromptConfigRequest request, * Request a regular LLM prompt * */ - default void requestPrompt(gateway.v1.Gateway.PromptRequest request, - io.grpc.stub.StreamObserver responseObserver) { + default void requestPrompt(com.basemind.client.Gateway.PromptRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRequestPromptMethod(), responseObserver); } @@ -187,8 +187,8 @@ default void requestPrompt(gateway.v1.Gateway.PromptRequest request, * Request a streaming LLM prompt * */ - default void requestStreamingPrompt(gateway.v1.Gateway.PromptRequest request, - io.grpc.stub.StreamObserver responseObserver) { + default void requestStreamingPrompt(com.basemind.client.Gateway.PromptRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRequestStreamingPromptMethod(), responseObserver); } } @@ -231,8 +231,8 @@ protected APIGatewayServiceStub build( * Request the configuration for making prompt requests * */ - public void requestPromptConfig(gateway.v1.Gateway.PromptConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void requestPromptConfig(com.basemind.client.Gateway.PromptConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRequestPromptConfigMethod(), getCallOptions()), request, responseObserver); } @@ -242,8 +242,8 @@ public void requestPromptConfig(gateway.v1.Gateway.PromptConfigRequest request, * Request a regular LLM prompt * */ - public void requestPrompt(gateway.v1.Gateway.PromptRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void requestPrompt(com.basemind.client.Gateway.PromptRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRequestPromptMethod(), getCallOptions()), request, responseObserver); } @@ -253,8 +253,8 @@ public void requestPrompt(gateway.v1.Gateway.PromptRequest request, * Request a streaming LLM prompt * */ - public void requestStreamingPrompt(gateway.v1.Gateway.PromptRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void requestStreamingPrompt(com.basemind.client.Gateway.PromptRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncServerStreamingCall( getChannel().newCall(getRequestStreamingPromptMethod(), getCallOptions()), request, responseObserver); } @@ -284,7 +284,7 @@ protected APIGatewayServiceBlockingStub build( * Request the configuration for making prompt requests * */ - public gateway.v1.Gateway.PromptConfigResponse requestPromptConfig(gateway.v1.Gateway.PromptConfigRequest request) { + public com.basemind.client.Gateway.PromptConfigResponse requestPromptConfig(com.basemind.client.Gateway.PromptConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRequestPromptConfigMethod(), getCallOptions(), request); } @@ -294,7 +294,7 @@ public gateway.v1.Gateway.PromptConfigResponse requestPromptConfig(gateway.v1.Ga * Request a regular LLM prompt * */ - public gateway.v1.Gateway.PromptResponse requestPrompt(gateway.v1.Gateway.PromptRequest request) { + public com.basemind.client.Gateway.PromptResponse requestPrompt(com.basemind.client.Gateway.PromptRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRequestPromptMethod(), getCallOptions(), request); } @@ -304,8 +304,8 @@ public gateway.v1.Gateway.PromptResponse requestPrompt(gateway.v1.Gateway.Prompt * Request a streaming LLM prompt * */ - public java.util.Iterator requestStreamingPrompt( - gateway.v1.Gateway.PromptRequest request) { + public java.util.Iterator requestStreamingPrompt( + com.basemind.client.Gateway.PromptRequest request) { return io.grpc.stub.ClientCalls.blockingServerStreamingCall( getChannel(), getRequestStreamingPromptMethod(), getCallOptions(), request); } @@ -335,8 +335,8 @@ protected APIGatewayServiceFutureStub build( * Request the configuration for making prompt requests * */ - public com.google.common.util.concurrent.ListenableFuture requestPromptConfig( - gateway.v1.Gateway.PromptConfigRequest request) { + public com.google.common.util.concurrent.ListenableFuture requestPromptConfig( + com.basemind.client.Gateway.PromptConfigRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRequestPromptConfigMethod(), getCallOptions()), request); } @@ -346,8 +346,8 @@ public com.google.common.util.concurrent.ListenableFuture */ - public com.google.common.util.concurrent.ListenableFuture requestPrompt( - gateway.v1.Gateway.PromptRequest request) { + public com.google.common.util.concurrent.ListenableFuture requestPrompt( + com.basemind.client.Gateway.PromptRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRequestPromptMethod(), getCallOptions()), request); } @@ -375,16 +375,16 @@ private static final class MethodHandlers implements public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { case METHODID_REQUEST_PROMPT_CONFIG: - serviceImpl.requestPromptConfig((gateway.v1.Gateway.PromptConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.requestPromptConfig((com.basemind.client.Gateway.PromptConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REQUEST_PROMPT: - serviceImpl.requestPrompt((gateway.v1.Gateway.PromptRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.requestPrompt((com.basemind.client.Gateway.PromptRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_REQUEST_STREAMING_PROMPT: - serviceImpl.requestStreamingPrompt((gateway.v1.Gateway.PromptRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); + serviceImpl.requestStreamingPrompt((com.basemind.client.Gateway.PromptRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); break; default: throw new AssertionError(); @@ -408,22 +408,22 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser getRequestPromptConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - gateway.v1.Gateway.PromptConfigRequest, - gateway.v1.Gateway.PromptConfigResponse>( + com.basemind.client.Gateway.PromptConfigRequest, + com.basemind.client.Gateway.PromptConfigResponse>( service, METHODID_REQUEST_PROMPT_CONFIG))) .addMethod( getRequestPromptMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< - gateway.v1.Gateway.PromptRequest, - gateway.v1.Gateway.PromptResponse>( + com.basemind.client.Gateway.PromptRequest, + com.basemind.client.Gateway.PromptResponse>( service, METHODID_REQUEST_PROMPT))) .addMethod( getRequestStreamingPromptMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( new MethodHandlers< - gateway.v1.Gateway.PromptRequest, - gateway.v1.Gateway.StreamingPromptResponse>( + com.basemind.client.Gateway.PromptRequest, + com.basemind.client.Gateway.StreamingPromptResponse>( service, METHODID_REQUEST_STREAMING_PROMPT))) .build(); } @@ -434,7 +434,7 @@ private static abstract class APIGatewayServiceBaseDescriptorSupplier @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return gateway.v1.Gateway.getDescriptor(); + return com.basemind.client.Gateway.getDescriptor(); } @java.lang.Override diff --git a/gen/kt/gateway/v1/GatewayGrpcKt.kt b/gen/kt/com/basemind/client/GatewayGrpcKt.kt similarity index 98% rename from gen/kt/gateway/v1/GatewayGrpcKt.kt rename to gen/kt/com/basemind/client/GatewayGrpcKt.kt index 3bd2c892..aabef4f4 100644 --- a/gen/kt/gateway/v1/GatewayGrpcKt.kt +++ b/gen/kt/com/basemind/client/GatewayGrpcKt.kt @@ -1,6 +1,6 @@ -package gateway.v1 +package com.basemind.client -import gateway.v1.APIGatewayServiceGrpc.getServiceDescriptor +import com.basemind.client.APIGatewayServiceGrpc.getServiceDescriptor import io.grpc.CallOptions import io.grpc.CallOptions.DEFAULT import io.grpc.Channel diff --git a/gen/kt/gateway/v1/GatewayKt.kt b/gen/kt/com/basemind/client/GatewayKt.kt similarity index 86% rename from gen/kt/gateway/v1/GatewayKt.kt rename to gen/kt/com/basemind/client/GatewayKt.kt index b8a61319..708846c1 100644 --- a/gen/kt/gateway/v1/GatewayKt.kt +++ b/gen/kt/com/basemind/client/GatewayKt.kt @@ -3,4 +3,4 @@ // Generated files should ignore deprecation warnings @file:Suppress("DEPRECATION") -package gateway.v1; +package com.basemind.client; diff --git a/gen/kt/com/basemind/client/PromptConfigRequestKt.kt b/gen/kt/com/basemind/client/PromptConfigRequestKt.kt new file mode 100644 index 00000000..a56e2147 --- /dev/null +++ b/gen/kt/com/basemind/client/PromptConfigRequestKt.kt @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: gateway/v1/gateway.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package com.basemind.client; + +@kotlin.jvm.JvmName("-initializepromptConfigRequest") +public inline fun promptConfigRequest(block: com.basemind.client.PromptConfigRequestKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptConfigRequest = + com.basemind.client.PromptConfigRequestKt.Dsl._create(com.basemind.client.Gateway.PromptConfigRequest.newBuilder()).apply { block() }._build() +/** + * ``` + * A request for a prompt configuration - retrieving the expected prompt variables + * ``` + * + * Protobuf type `gateway.v1.PromptConfigRequest` + */ +public object PromptConfigRequestKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: com.basemind.client.Gateway.PromptConfigRequest.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: com.basemind.client.Gateway.PromptConfigRequest.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): com.basemind.client.Gateway.PromptConfigRequest = _builder.build() + } +} +@kotlin.jvm.JvmSynthetic +public inline fun com.basemind.client.Gateway.PromptConfigRequest.copy(block: `com.basemind.client`.PromptConfigRequestKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptConfigRequest = + `com.basemind.client`.PromptConfigRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() diff --git a/gen/kt/gateway/v1/PromptConfigResponseKt.kt b/gen/kt/com/basemind/client/PromptConfigResponseKt.kt similarity index 83% rename from gen/kt/gateway/v1/PromptConfigResponseKt.kt rename to gen/kt/com/basemind/client/PromptConfigResponseKt.kt index 9962610c..6385bd35 100644 --- a/gen/kt/gateway/v1/PromptConfigResponseKt.kt +++ b/gen/kt/com/basemind/client/PromptConfigResponseKt.kt @@ -3,11 +3,11 @@ // Generated files should ignore deprecation warnings @file:Suppress("DEPRECATION") -package gateway.v1; +package com.basemind.client; @kotlin.jvm.JvmName("-initializepromptConfigResponse") -public inline fun promptConfigResponse(block: gateway.v1.PromptConfigResponseKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptConfigResponse = - gateway.v1.PromptConfigResponseKt.Dsl._create(gateway.v1.Gateway.PromptConfigResponse.newBuilder()).apply { block() }._build() +public inline fun promptConfigResponse(block: com.basemind.client.PromptConfigResponseKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptConfigResponse = + com.basemind.client.PromptConfigResponseKt.Dsl._create(com.basemind.client.Gateway.PromptConfigResponse.newBuilder()).apply { block() }._build() /** * ``` * A response for a prompt configuration - retrieving the expected prompt variables @@ -19,17 +19,17 @@ public object PromptConfigResponseKt { @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) @com.google.protobuf.kotlin.ProtoDslMarker public class Dsl private constructor( - private val _builder: gateway.v1.Gateway.PromptConfigResponse.Builder + private val _builder: com.basemind.client.Gateway.PromptConfigResponse.Builder ) { public companion object { @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _create(builder: gateway.v1.Gateway.PromptConfigResponse.Builder): Dsl = Dsl(builder) + internal fun _create(builder: com.basemind.client.Gateway.PromptConfigResponse.Builder): Dsl = Dsl(builder) } @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _build(): gateway.v1.Gateway.PromptConfigResponse = _builder.build() + internal fun _build(): com.basemind.client.Gateway.PromptConfigResponse = _builder.build() /** * An uninstantiable, behaviorless type to represent the field in @@ -131,5 +131,5 @@ public object PromptConfigResponseKt { }} } @kotlin.jvm.JvmSynthetic -public inline fun gateway.v1.Gateway.PromptConfigResponse.copy(block: `gateway.v1`.PromptConfigResponseKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptConfigResponse = - `gateway.v1`.PromptConfigResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() +public inline fun com.basemind.client.Gateway.PromptConfigResponse.copy(block: `com.basemind.client`.PromptConfigResponseKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptConfigResponse = + `com.basemind.client`.PromptConfigResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() diff --git a/gen/kt/gateway/v1/PromptRequestKt.kt b/gen/kt/com/basemind/client/PromptRequestKt.kt similarity index 83% rename from gen/kt/gateway/v1/PromptRequestKt.kt rename to gen/kt/com/basemind/client/PromptRequestKt.kt index 3f9c78bf..6bec949a 100644 --- a/gen/kt/gateway/v1/PromptRequestKt.kt +++ b/gen/kt/com/basemind/client/PromptRequestKt.kt @@ -3,11 +3,11 @@ // Generated files should ignore deprecation warnings @file:Suppress("DEPRECATION") -package gateway.v1; +package com.basemind.client; @kotlin.jvm.JvmName("-initializepromptRequest") -public inline fun promptRequest(block: gateway.v1.PromptRequestKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptRequest = - gateway.v1.PromptRequestKt.Dsl._create(gateway.v1.Gateway.PromptRequest.newBuilder()).apply { block() }._build() +public inline fun promptRequest(block: com.basemind.client.PromptRequestKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptRequest = + com.basemind.client.PromptRequestKt.Dsl._create(com.basemind.client.Gateway.PromptRequest.newBuilder()).apply { block() }._build() /** * ``` * A request for a prompt - sending user input to the server. @@ -19,17 +19,17 @@ public object PromptRequestKt { @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) @com.google.protobuf.kotlin.ProtoDslMarker public class Dsl private constructor( - private val _builder: gateway.v1.Gateway.PromptRequest.Builder + private val _builder: com.basemind.client.Gateway.PromptRequest.Builder ) { public companion object { @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _create(builder: gateway.v1.Gateway.PromptRequest.Builder): Dsl = Dsl(builder) + internal fun _create(builder: com.basemind.client.Gateway.PromptRequest.Builder): Dsl = Dsl(builder) } @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _build(): gateway.v1.Gateway.PromptRequest = _builder.build() + internal fun _build(): com.basemind.client.Gateway.PromptRequest = _builder.build() /** * An uninstantiable, behaviorless type to represent the field in @@ -124,5 +124,5 @@ public object PromptRequestKt { } } @kotlin.jvm.JvmSynthetic -public inline fun gateway.v1.Gateway.PromptRequest.copy(block: `gateway.v1`.PromptRequestKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptRequest = - `gateway.v1`.PromptRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() +public inline fun com.basemind.client.Gateway.PromptRequest.copy(block: `com.basemind.client`.PromptRequestKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptRequest = + `com.basemind.client`.PromptRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() diff --git a/gen/kt/gateway/v1/PromptResponseKt.kt b/gen/kt/com/basemind/client/PromptResponseKt.kt similarity index 67% rename from gen/kt/gateway/v1/PromptResponseKt.kt rename to gen/kt/com/basemind/client/PromptResponseKt.kt index ec04da1c..ce563ac8 100644 --- a/gen/kt/gateway/v1/PromptResponseKt.kt +++ b/gen/kt/com/basemind/client/PromptResponseKt.kt @@ -3,11 +3,11 @@ // Generated files should ignore deprecation warnings @file:Suppress("DEPRECATION") -package gateway.v1; +package com.basemind.client; @kotlin.jvm.JvmName("-initializepromptResponse") -public inline fun promptResponse(block: gateway.v1.PromptResponseKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptResponse = - gateway.v1.PromptResponseKt.Dsl._create(gateway.v1.Gateway.PromptResponse.newBuilder()).apply { block() }._build() +public inline fun promptResponse(block: com.basemind.client.PromptResponseKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptResponse = + com.basemind.client.PromptResponseKt.Dsl._create(com.basemind.client.Gateway.PromptResponse.newBuilder()).apply { block() }._build() /** * ``` * A Prompt Response Message @@ -19,17 +19,17 @@ public object PromptResponseKt { @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) @com.google.protobuf.kotlin.ProtoDslMarker public class Dsl private constructor( - private val _builder: gateway.v1.Gateway.PromptResponse.Builder + private val _builder: com.basemind.client.Gateway.PromptResponse.Builder ) { public companion object { @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _create(builder: gateway.v1.Gateway.PromptResponse.Builder): Dsl = Dsl(builder) + internal fun _create(builder: com.basemind.client.Gateway.PromptResponse.Builder): Dsl = Dsl(builder) } @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _build(): gateway.v1.Gateway.PromptResponse = _builder.build() + internal fun _build(): com.basemind.client.Gateway.PromptResponse = _builder.build() /** * ``` @@ -83,5 +83,5 @@ public object PromptResponseKt { } } @kotlin.jvm.JvmSynthetic -public inline fun gateway.v1.Gateway.PromptResponse.copy(block: `gateway.v1`.PromptResponseKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptResponse = - `gateway.v1`.PromptResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() +public inline fun com.basemind.client.Gateway.PromptResponse.copy(block: `com.basemind.client`.PromptResponseKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.PromptResponse = + `com.basemind.client`.PromptResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() diff --git a/gen/kt/gateway/v1/StreamingPromptResponseKt.kt b/gen/kt/com/basemind/client/StreamingPromptResponseKt.kt similarity index 76% rename from gen/kt/gateway/v1/StreamingPromptResponseKt.kt rename to gen/kt/com/basemind/client/StreamingPromptResponseKt.kt index ff060044..31ae4b48 100644 --- a/gen/kt/gateway/v1/StreamingPromptResponseKt.kt +++ b/gen/kt/com/basemind/client/StreamingPromptResponseKt.kt @@ -3,11 +3,11 @@ // Generated files should ignore deprecation warnings @file:Suppress("DEPRECATION") -package gateway.v1; +package com.basemind.client; @kotlin.jvm.JvmName("-initializestreamingPromptResponse") -public inline fun streamingPromptResponse(block: gateway.v1.StreamingPromptResponseKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.StreamingPromptResponse = - gateway.v1.StreamingPromptResponseKt.Dsl._create(gateway.v1.Gateway.StreamingPromptResponse.newBuilder()).apply { block() }._build() +public inline fun streamingPromptResponse(block: com.basemind.client.StreamingPromptResponseKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.StreamingPromptResponse = + com.basemind.client.StreamingPromptResponseKt.Dsl._create(com.basemind.client.Gateway.StreamingPromptResponse.newBuilder()).apply { block() }._build() /** * ``` * An Streaming Prompt Response Message @@ -19,17 +19,17 @@ public object StreamingPromptResponseKt { @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) @com.google.protobuf.kotlin.ProtoDslMarker public class Dsl private constructor( - private val _builder: gateway.v1.Gateway.StreamingPromptResponse.Builder + private val _builder: com.basemind.client.Gateway.StreamingPromptResponse.Builder ) { public companion object { @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _create(builder: gateway.v1.Gateway.StreamingPromptResponse.Builder): Dsl = Dsl(builder) + internal fun _create(builder: com.basemind.client.Gateway.StreamingPromptResponse.Builder): Dsl = Dsl(builder) } @kotlin.jvm.JvmSynthetic @kotlin.PublishedApi - internal fun _build(): gateway.v1.Gateway.StreamingPromptResponse = _builder.build() + internal fun _build(): com.basemind.client.Gateway.StreamingPromptResponse = _builder.build() /** * ``` @@ -130,5 +130,5 @@ public object StreamingPromptResponseKt { } } @kotlin.jvm.JvmSynthetic -public inline fun gateway.v1.Gateway.StreamingPromptResponse.copy(block: `gateway.v1`.StreamingPromptResponseKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.StreamingPromptResponse = - `gateway.v1`.StreamingPromptResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() +public inline fun com.basemind.client.Gateway.StreamingPromptResponse.copy(block: `com.basemind.client`.StreamingPromptResponseKt.Dsl.() -> kotlin.Unit): com.basemind.client.Gateway.StreamingPromptResponse = + `com.basemind.client`.StreamingPromptResponseKt.Dsl._create(this.toBuilder()).apply { block() }._build() diff --git a/gen/kt/gateway/v1/PromptConfigRequestKt.kt b/gen/kt/gateway/v1/PromptConfigRequestKt.kt deleted file mode 100644 index 250cb9c7..00000000 --- a/gen/kt/gateway/v1/PromptConfigRequestKt.kt +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: gateway/v1/gateway.proto - -// Generated files should ignore deprecation warnings -@file:Suppress("DEPRECATION") -package gateway.v1; - -@kotlin.jvm.JvmName("-initializepromptConfigRequest") -public inline fun promptConfigRequest(block: gateway.v1.PromptConfigRequestKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptConfigRequest = - gateway.v1.PromptConfigRequestKt.Dsl._create(gateway.v1.Gateway.PromptConfigRequest.newBuilder()).apply { block() }._build() -/** - * ``` - * A request for a prompt configuration - retrieving the expected prompt variables - * ``` - * - * Protobuf type `gateway.v1.PromptConfigRequest` - */ -public object PromptConfigRequestKt { - @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) - @com.google.protobuf.kotlin.ProtoDslMarker - public class Dsl private constructor( - private val _builder: gateway.v1.Gateway.PromptConfigRequest.Builder - ) { - public companion object { - @kotlin.jvm.JvmSynthetic - @kotlin.PublishedApi - internal fun _create(builder: gateway.v1.Gateway.PromptConfigRequest.Builder): Dsl = Dsl(builder) - } - - @kotlin.jvm.JvmSynthetic - @kotlin.PublishedApi - internal fun _build(): gateway.v1.Gateway.PromptConfigRequest = _builder.build() - } -} -@kotlin.jvm.JvmSynthetic -public inline fun gateway.v1.Gateway.PromptConfigRequest.copy(block: `gateway.v1`.PromptConfigRequestKt.Dsl.() -> kotlin.Unit): gateway.v1.Gateway.PromptConfigRequest = - `gateway.v1`.PromptConfigRequestKt.Dsl._create(this.toBuilder()).apply { block() }._build() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 48241f43..8e5ca5c2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,22 +1,30 @@ [versions] +androidGradlePlugin = "8.1.1" appcompat = "1.6.1" coreKtx = "1.12.0" espressoCore = "3.5.1" +grpcVersion = "1.58.0" junit = "4.13.2" junitVersion = "1.1.5" -androidGradlePlugin = "8.1.1" kotlinVersion = "1.9.0" +protobufVersion = "0.9.4" +grpcKotlinVersion = "1.3.1" [libraries] androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" } androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" } +grpc-okhttp = { module = "io.grpc:grpc-okhttp", version.ref = "grpcVersion" } +grpc-protobuf-lite = { module = "io.grpc:grpc-protobuf-lite", version.ref = "grpcVersion" } +grpc-stub = { module = "io.grpc:grpc-stub", version.ref = "grpcVersion" } +grpc-kotlin-stub = { module = "io.grpc:grpc-kotlin-stub", version.ref = "grpcKotlinVersion" } junit = { module = "junit:junit", version.ref = "junit" } [plugins] android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" } +protobuf = { id = "com.google.protobuf", version.ref = "protobufVersion" } [bundles] diff --git a/proto/gateway/v1/gateway.proto b/proto/gateway/v1/gateway.proto index 7daaf88b..c612a0d8 100644 --- a/proto/gateway/v1/gateway.proto +++ b/proto/gateway/v1/gateway.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package gateway.v1; option go_package = "github.com/basemind-ai/monorepo/gen/gateway"; +option java_package = "com.basemind.client"; // The API Gateway service definition. service APIGatewayService { diff --git a/sdks/android/sdk/build.gradle.kts b/sdks/android/sdk/build.gradle.kts index b9fde921..6a2fe6de 100644 --- a/sdks/android/sdk/build.gradle.kts +++ b/sdks/android/sdk/build.gradle.kts @@ -39,6 +39,10 @@ dependencies { testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) + implementation(libs.grpc.okhttp) + implementation(libs.grpc.protobuf.lite) + implementation(libs.grpc.stub) + implementation(libs.grpc.kotlin.stub) } // root directories @@ -47,7 +51,7 @@ private val androidSdkDir = "$androidCoreDir/sdk" private val androidSdkMainDir = "$androidSdkDir/src/main/java/com/basemind/client" // directories in focus -private val genKtGatewayDir = "$rootDir/gen/kt/gateway/v1" +private val genKtGatewayDir = "$rootDir/gen/kt/com/basemind/client" private val copyDestinationGatewayDir = "$androidSdkMainDir/gateway" private val copyDestinationPModelsDir = "$androidSdkMainDir/promptModels" diff --git a/sdks/android/sdk/src/main/java/com/basemind/client/source/NewFile.kt b/sdks/android/sdk/src/main/java/com/basemind/client/source/NewFile.kt new file mode 100644 index 00000000..33ec31ec --- /dev/null +++ b/sdks/android/sdk/src/main/java/com/basemind/client/source/NewFile.kt @@ -0,0 +1,8 @@ +package com.basemind.client.source + +import com.basemind.client.APIGatewayServiceGrpc +import io.grpc.ManagedChannelBuilder + +const val PORT = 8980 +val channel = ManagedChannelBuilder.forAddress("localhost", PORT).usePlaintext().build() +var stub = APIGatewayServiceGrpc.newBlockingStub(channel)