@botpress/zai 1.1.0 → 1.2.0

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,127 +0,0 @@
1
-
2
- // This file is generated. Do not edit it manually.
3
- // See 'scripts/update-models.ts'
4
-
5
- /* eslint-disable */
6
- /* tslint:disable */
7
-
8
- export namespace llm {
9
- export namespace generateContent {
10
- export type Input = {
11
- /** Model to use for content generation */
12
- model?: { id: string }
13
- ;
14
- /** Optional system prompt to guide the model */
15
- systemPrompt?: string
16
- ;
17
- /** Array of messages for the model to process */
18
- messages: Array<{ role: 'user' | 'assistant'; type?: 'text' | 'tool_calls' | 'tool_result' | 'multipart';
19
- /** Required if `type` is "tool_calls" */
20
- toolCalls?: Array<{ id: string; type: 'function'; function: { name: string;
21
- /** Some LLMs may generate invalid JSON for a tool call, so this will be `null` when it happens. */
22
- arguments:
23
- { [key: string]: any } | null
24
- } }>
25
- ;
26
- /** Required if `type` is "tool_result" */
27
- toolResultCallId?: string
28
- ;
29
- /** Required unless `type` is "tool_call". If `type` is "multipart", this field must be an array of content objects. If `type` is "tool_result" then this field should be the result of the tool call (a plain string or a JSON-encoded array or object). If `type` is "tool_call" then the `toolCalls` field should be used instead. */
30
- content:
31
-
32
- string | Array<{ type: 'text' | 'image';
33
- /** Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL. */
34
- mimeType?: string
35
- ;
36
- /** Required if part type is "text" */
37
- text?: string
38
- ;
39
- /** Required if part type is "image" */
40
- url?: string
41
- }> | null
42
- }>
43
- ;
44
- /** Response format expected from the model. If "json_object" is chosen, you must instruct the model to generate JSON either via the system prompt or a user message. */
45
- responseFormat?: 'text' | 'json_object'
46
- ;
47
- /** Maximum number of tokens allowed in the generated response */
48
- maxTokens?: number
49
- ;
50
- /** Sampling temperature for the model. Higher values result in more random outputs. */
51
- temperature?: /** Sampling temperature for the model. Higher values result in more random outputs. */ number
52
- ;
53
- /** Top-p sampling parameter. Limits sampling to the smallest set of tokens with a cumulative probability above the threshold. */
54
- topP?: /** Top-p sampling parameter. Limits sampling to the smallest set of tokens with a cumulative probability above the threshold. */ number
55
- ;
56
- /** Sequences where the model should stop generating further tokens. */
57
- stopSequences?: string[]
58
- ; tools?: Array<{ type: 'function'; function: {
59
- /** Function name */
60
- name: string
61
- ; description?: string;
62
- /** JSON schema of the function arguments */
63
- argumentsSchema?: { }
64
- } }>; toolChoice?: { type?: 'auto' | 'specific' | 'any' | 'none' | '';
65
- /** Required if `type` is "specific" */
66
- functionName?: string
67
- }; userId?: string;
68
- /** Set to `true` to output debug information to the bot logs */
69
- debug?: boolean
70
- ; meta?: {
71
- /** Source of the prompt, e.g. agent/:id/:version cards/ai-generate, cards/ai-task, nodes/autonomous, etc. */
72
- promptSource?: string
73
- ; promptCategory?: string;
74
- /** Name of the integration that originally received the message that initiated this action */
75
- integrationName?: string
76
- } };;
77
- export type Output = {
78
- /** Response ID from LLM provider */
79
- id: string
80
- ;
81
- /** LLM provider name */
82
- provider: string
83
- ;
84
- /** Model name */
85
- model: string
86
- ; choices: Array<{ type?: 'text' | 'tool_calls' | 'tool_result' | 'multipart';
87
- /** Required if `type` is "tool_calls" */
88
- toolCalls?: Array<{ id: string; type: 'function'; function: { name: string;
89
- /** Some LLMs may generate invalid JSON for a tool call, so this will be `null` when it happens. */
90
- arguments:
91
- { [key: string]: any } | null
92
- } }>
93
- ;
94
- /** Required if `type` is "tool_result" */
95
- toolResultCallId?: string
96
- ;
97
- /** Required unless `type` is "tool_call". If `type` is "multipart", this field must be an array of content objects. If `type` is "tool_result" then this field should be the result of the tool call (a plain string or a JSON-encoded array or object). If `type` is "tool_call" then the `toolCalls` field should be used instead. */
98
- content:
99
-
100
- string | Array<{ type: 'text' | 'image';
101
- /** Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL. */
102
- mimeType?: string
103
- ;
104
- /** Required if part type is "text" */
105
- text?: string
106
- ;
107
- /** Required if part type is "image" */
108
- url?: string
109
- }> | null
110
- ; role: 'assistant'; index: number; stopReason: 'stop' | 'max_tokens' | 'tool_calls' | 'content_filter' | 'other' }>; usage: {
111
- /** Number of input tokens used by the model */
112
- inputTokens: number
113
- ;
114
- /** Cost of the input tokens received by the model, in U.S. dollars */
115
- inputCost: number
116
- ;
117
- /** Number of output tokens used by the model */
118
- outputTokens: number
119
- ;
120
- /** Cost of the output tokens generated by the model, in U.S. dollars */
121
- outputCost: number
122
- }; botpress: {
123
- /** Total cost of the content generation, in U.S. dollars */
124
- cost: number
125
- } };;
126
- }
127
- }
@@ -1,19 +0,0 @@
1
-
2
- // This file is generated. Do not edit it manually.
3
- // See 'scripts/update-models.ts'
4
-
5
- /* eslint-disable */
6
- /* tslint:disable */
7
-
8
- export namespace llm {
9
- export namespace listLanguageModels {
10
- export type Input = { };;
11
- export type Output = { models: Array<{ id: string; name: string; description: string; tags: Array<'recommended' | 'deprecated' | 'general-purpose' | 'low-cost' | 'vision' | 'coding' | 'agents' | 'function-calling' | 'roleplay' | 'storytelling' | 'reasoning'>; input: { maxTokens: number;
12
- /** Cost per 1 million tokens, in U.S. dollars */
13
- costPer1MTokens: number
14
- }; output: { maxTokens: number;
15
- /** Cost per 1 million tokens, in U.S. dollars */
16
- costPer1MTokens: number
17
- } } & { id: string }> };;
18
- }
19
- }