Skip to content

Commit 11f5426

Browse files
committed
feat: add generateButton to the UI api
1 parent da185db commit 11f5426

File tree

19 files changed

+488
-425
lines changed

19 files changed

+488
-425
lines changed

_build/gpm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: modAI
2-
version: 0.11.0-alpha9
2+
version: 0.11.0-alpha10
33
lowCaseName: modai
44
namespace: modAI
55
author: 'John Peca'

_build/js/src/executor.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,33 +117,39 @@ export type ImagePrompt = { type: 'image'; value: string };
117117

118118
export type Prompt = string | [TextPrompt, ...ImagePrompt[]];
119119

120-
type FreeTextParams = {
120+
export type FreeTextParams = {
121121
prompt: Prompt;
122122
field?: string;
123123
context?: string;
124124
namespace?: string;
125125
messages: { role: string; content: Prompt }[];
126126
};
127127

128-
type TextParams = {
128+
export type TextParams = {
129129
field?: string;
130130
namespace?: string;
131-
id: string | number;
132-
};
131+
} & (
132+
| {
133+
resourceId: string | number;
134+
}
135+
| {
136+
content?: string;
137+
}
138+
);
133139

134-
type VisionParams = {
140+
export type VisionParams = {
135141
field?: string;
136142
namespace?: string;
137143
image: string;
138144
};
139145

140-
type ImageParams = {
146+
export type ImageParams = {
141147
prompt: string;
142148
field?: string;
143149
namespace?: string;
144150
};
145151

146-
type DownloadImageParams = {
152+
export type DownloadImageParams = {
147153
url: string;
148154
field?: string;
149155
namespace?: string;

0 commit comments

Comments
 (0)