@botpress/cognitive 0.1.47 → 0.1.48

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.
@@ -1,19 +1,19 @@
1
1
 
2
- > @botpress/cognitive@0.1.47 build /home/runner/work/botpress/botpress/packages/cognitive
2
+ > @botpress/cognitive@0.1.48 build /home/runner/work/botpress/botpress/packages/cognitive
3
3
  > pnpm build:type && pnpm build:neutral && size-limit
4
4
 
5
5
 
6
- > @botpress/cognitive@0.1.47 build:type /home/runner/work/botpress/botpress/packages/cognitive
6
+ > @botpress/cognitive@0.1.48 build:type /home/runner/work/botpress/botpress/packages/cognitive
7
7
  > tsup --tsconfig tsconfig.build.json ./src/index.ts --dts-resolve --dts-only --clean
8
8
 
9
9
  CLI Building entry: ./src/index.ts
10
10
  CLI Using tsconfig: tsconfig.build.json
11
11
  CLI tsup v8.0.2
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 8896ms
14
- DTS dist/index.d.ts 627.35 KB
13
+ DTS ⚡️ Build success in 9558ms
14
+ DTS dist/index.d.ts 627.38 KB
15
15
 
16
- > @botpress/cognitive@0.1.47 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
16
+ > @botpress/cognitive@0.1.48 build:neutral /home/runner/work/botpress/botpress/packages/cognitive
17
17
  > ts-node -T ./build.ts --neutral
18
18
 
19
19
  Done
package/build.ts CHANGED
@@ -14,11 +14,11 @@ const common: esbuild.BuildOptions = {
14
14
 
15
15
  async function generateTypes() {
16
16
  const code =
17
- `export type GenerateContentInput = ${llm.schemas.GenerateContentInputSchema(z.any()).toTypescriptType()};
17
+ `export type GenerateContentInput = ${llm.schemas.GenerateContentInputSchema(z.any()).toTypescriptType({ treatDefaultAsOptional: true })};
18
18
 
19
- export type GenerateContentOutput = ${llm.schemas.GenerateContentOutputSchema.toTypescriptType()};
19
+ export type GenerateContentOutput = ${llm.schemas.GenerateContentOutputSchema.toTypescriptType({ treatDefaultAsOptional: true })};
20
20
 
21
- export type Model = ${llm.schemas.ModelSchema.toTypescriptType()};
21
+ export type Model = ${llm.schemas.ModelSchema.toTypescriptType({ treatDefaultAsOptional: true })};
22
22
  `.trim()
23
23
 
24
24
  const filePath = './src/schemas.gen.ts'
package/dist/index.d.ts CHANGED
@@ -33,7 +33,7 @@ type GenerateContentInput = {
33
33
  type: 'text' | 'image';
34
34
  /** Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL. */
35
35
  mimeType?: string;
36
- /** Required if part type is "text" */
36
+ /** Required if part type is "text" */
37
37
  text?: string;
38
38
  /** Required if part type is "image" */
39
39
  url?: string;
@@ -103,7 +103,7 @@ type GenerateContentOutput = {
103
103
  type: 'text' | 'image';
104
104
  /** Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL. */
105
105
  mimeType?: string;
106
- /** Required if part type is "text" */
106
+ /** Required if part type is "text" */
107
107
  text?: string;
108
108
  /** Required if part type is "image" */
109
109
  url?: string;
@@ -18030,6 +18030,7 @@ type IClient = Simplify<Client$1 & {
18030
18030
  }>;
18031
18031
  type ClientProps$2 = CommonClientProps & {
18032
18032
  integrationId?: string;
18033
+ integrationAlias?: string;
18033
18034
  workspaceId?: string;
18034
18035
  botId?: string;
18035
18036
  token?: string;
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@botpress/cognitive",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "Wrapper around the Botpress Client to call LLMs",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
8
8
  "license": "MIT",
9
+ "repository": {
10
+ "url": "https://github.com/botpress/botpress"
11
+ },
9
12
  "scripts": {
10
13
  "check:type": "tsc --noEmit",
11
14
  "build:type": "tsup --tsconfig tsconfig.build.json ./src/index.ts --dts-resolve --dts-only --clean",
@@ -31,7 +34,7 @@
31
34
  "devDependencies": {
32
35
  "@botpress/client": "workspace:*",
33
36
  "@botpress/common": "workspace:*",
34
- "@bpinternal/zui": "^1.0.1",
37
+ "@bpinternal/zui": "1.2.1",
35
38
  "@size-limit/file": "^11.1.6",
36
39
  "@types/axios": "^0.14.4",
37
40
  "@types/debug": "^4.1.12",