@purpleschool/ai-proxy 0.2.17 → 0.2.18

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 = {}));
@@ -2,4 +2,5 @@ export enum IMAGE_GENERATION_RESPONSE_TYPE {
2
2
  URL = 'url',
3
3
  BASE64 = 'base64',
4
4
  JOB = 'job',
5
+ ERROR = 'error',
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/ai-proxy",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -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
 
@@ -35,14 +34,9 @@ message TextGenerationRequest {
35
34
  }
36
35
 
37
36
  message Message {
38
- optional string uuid = 1;
39
- string role = 2;
40
- string text = 3;
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;
37
+ string role = 1;
38
+ string content = 2;
39
+ repeated File files = 3;
46
40
  }
47
41
 
48
42
  message WebSearchParams {
@@ -57,8 +51,7 @@ message UserLocation {
57
51
 
58
52
  message File {
59
53
  string url = 1;
60
- string type = 2;
61
- string mimeType = 3;
54
+ string mimeType = 2;
62
55
  }
63
56
 
64
57
  message TextGenerationResponse {
@@ -88,21 +81,22 @@ message TextGenerationUnaryResponse {
88
81
  message ImageGenerationRequest {
89
82
  string model = 1;
90
83
  string prompt = 2;
91
- optional int32 width = 3;
92
- optional int32 height = 4;
93
- repeated Message messages = 5;
84
+ string aspectRatio = 3;
85
+ optional string resolution = 4;
86
+ repeated string attachedImages = 5;
94
87
  optional string callbackUrl = 6;
95
88
  }
96
89
 
97
90
  message ImageGenerationResponse {
98
91
  string model = 1;
99
- ImageGenerationData data = 2;
92
+ ImageGenerationData response = 2;
100
93
  }
101
94
 
102
95
  message ImageGenerationData {
103
- optional string data = 1;
104
- optional string externalId = 2;
96
+ repeated string data = 1;
97
+ string externalId = 2;
105
98
  string type = 3;
99
+ optional string errorMsg = 4;
106
100
  }
107
101
 
108
102
  // Image Editor