@purpleschool/ai-proxy 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,4 +6,5 @@ var IMAGE_GENERATION_RESPONSE_TYPE;
|
|
|
6
6
|
IMAGE_GENERATION_RESPONSE_TYPE["URL"] = "url";
|
|
7
7
|
IMAGE_GENERATION_RESPONSE_TYPE["BASE64"] = "base64";
|
|
8
8
|
IMAGE_GENERATION_RESPONSE_TYPE["JOB"] = "job";
|
|
9
|
+
IMAGE_GENERATION_RESPONSE_TYPE["ERROR"] = "error";
|
|
9
10
|
})(IMAGE_GENERATION_RESPONSE_TYPE || (exports.IMAGE_GENERATION_RESPONSE_TYPE = IMAGE_GENERATION_RESPONSE_TYPE = {}));
|
package/package.json
CHANGED
package/proto/ai-proxy.proto
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
|
-
import "google/protobuf/timestamp.proto";
|
|
3
2
|
import "google/protobuf/struct.proto";
|
|
4
3
|
package AiProxy;
|
|
5
4
|
|
|
@@ -8,6 +7,7 @@ service AiProxyService {
|
|
|
8
7
|
rpc TextGenerationUnary (TextGenerationUnaryRequest) returns (TextGenerationUnaryResponse);
|
|
9
8
|
|
|
10
9
|
rpc ImageGeneration (ImageGenerationRequest) returns (ImageGenerationResponse);
|
|
10
|
+
rpc ImageGenerationAsync (ImageGenerationRequest) returns (ImageGenerationResponse);
|
|
11
11
|
rpc ImageEditor (ImageEditorRequest) returns (ImageEditorResponse);
|
|
12
12
|
|
|
13
13
|
rpc VideoGeneration (VideoGenerationRequest) returns (VideoGenerationResponse);
|
|
@@ -35,14 +35,9 @@ message TextGenerationRequest {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
message Message {
|
|
38
|
-
|
|
39
|
-
string
|
|
40
|
-
|
|
41
|
-
repeated File files = 4;
|
|
42
|
-
optional string status = 5;
|
|
43
|
-
optional string externalId = 6;
|
|
44
|
-
google.protobuf.Timestamp createdAt = 7;
|
|
45
|
-
google.protobuf.Timestamp updatedAt = 8;
|
|
38
|
+
string role = 1;
|
|
39
|
+
string content = 2;
|
|
40
|
+
repeated File files = 3;
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
message WebSearchParams {
|
|
@@ -57,8 +52,7 @@ message UserLocation {
|
|
|
57
52
|
|
|
58
53
|
message File {
|
|
59
54
|
string url = 1;
|
|
60
|
-
string
|
|
61
|
-
string mimeType = 3;
|
|
55
|
+
string mimeType = 2;
|
|
62
56
|
}
|
|
63
57
|
|
|
64
58
|
message TextGenerationResponse {
|
|
@@ -88,21 +82,22 @@ message TextGenerationUnaryResponse {
|
|
|
88
82
|
message ImageGenerationRequest {
|
|
89
83
|
string model = 1;
|
|
90
84
|
string prompt = 2;
|
|
91
|
-
|
|
92
|
-
optional
|
|
93
|
-
repeated
|
|
85
|
+
string aspectRatio = 3;
|
|
86
|
+
optional string resolution = 4;
|
|
87
|
+
repeated string attachedImages = 5;
|
|
94
88
|
optional string callbackUrl = 6;
|
|
95
89
|
}
|
|
96
90
|
|
|
97
91
|
message ImageGenerationResponse {
|
|
98
92
|
string model = 1;
|
|
99
|
-
ImageGenerationData
|
|
93
|
+
ImageGenerationData response = 2;
|
|
100
94
|
}
|
|
101
95
|
|
|
102
96
|
message ImageGenerationData {
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
repeated string data = 1;
|
|
98
|
+
string externalId = 2;
|
|
105
99
|
string type = 3;
|
|
100
|
+
optional string errorMsg = 4;
|
|
106
101
|
}
|
|
107
102
|
|
|
108
103
|
// Image Editor
|