@assistant-ui/react 0.5.20 → 0.5.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{ModelConfigTypes-ComYH1b6.d.mts → AssistantTypes-BNB-knVq.d.mts} +64 -60
- package/dist/{ModelConfigTypes-ComYH1b6.d.ts → AssistantTypes-BNB-knVq.d.ts} +64 -60
- package/dist/chunk-BJPOCE4O.mjs +11 -0
- package/dist/chunk-BJPOCE4O.mjs.map +1 -0
- package/dist/chunk-DCHYNTHI.js +11 -0
- package/dist/chunk-DCHYNTHI.js.map +1 -0
- package/dist/chunk-NSPHKRLF.js +819 -0
- package/dist/chunk-NSPHKRLF.js.map +1 -0
- package/dist/chunk-ZWRFAYHH.mjs +819 -0
- package/dist/chunk-ZWRFAYHH.mjs.map +1 -0
- package/dist/edge.d.mts +90 -5
- package/dist/edge.d.ts +90 -5
- package/dist/edge.mjs +56 -44
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +7 -159
- package/dist/index.d.ts +7 -159
- package/dist/index.js +724 -1596
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -810
- package/dist/index.mjs.map +1 -1
- package/dist/tailwindcss/index.js +24 -52
- package/dist/tailwindcss/index.js.map +1 -1
- package/dist/tailwindcss/index.mjs +3 -0
- package/dist/tailwindcss/index.mjs.map +1 -1
- package/package.json +1 -12
- package/dist/chunk-BV6Y7C43.mjs +0 -61
- package/dist/chunk-BV6Y7C43.mjs.map +0 -1
- package/dist/internal.d.mts +0 -128
- package/dist/internal.d.ts +0 -128
- package/dist/internal.js +0 -619
- package/dist/internal.js.map +0 -1
- package/dist/internal.mjs +0 -531
- package/dist/internal.mjs.map +0 -1
- package/internal/README.md +0 -1
- package/internal/package.json +0 -5
@@ -1,7 +1,64 @@
|
|
1
|
-
import { LanguageModelV1LogProbs } from '@ai-sdk/provider';
|
2
|
-
import { ReactNode } from 'react';
|
3
1
|
import { z } from 'zod';
|
4
2
|
import { JSONSchema7 } from 'json-schema';
|
3
|
+
import { LanguageModelV1LogProbs } from '@ai-sdk/provider';
|
4
|
+
import { ReactNode } from 'react';
|
5
|
+
|
6
|
+
declare const LanguageModelV1CallSettingsSchema: z.ZodObject<{
|
7
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
8
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
9
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
10
|
+
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
11
|
+
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
12
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
13
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
15
|
+
maxTokens?: number | undefined;
|
16
|
+
temperature?: number | undefined;
|
17
|
+
topP?: number | undefined;
|
18
|
+
presencePenalty?: number | undefined;
|
19
|
+
frequencyPenalty?: number | undefined;
|
20
|
+
seed?: number | undefined;
|
21
|
+
headers?: Record<string, string | undefined> | undefined;
|
22
|
+
}, {
|
23
|
+
maxTokens?: number | undefined;
|
24
|
+
temperature?: number | undefined;
|
25
|
+
topP?: number | undefined;
|
26
|
+
presencePenalty?: number | undefined;
|
27
|
+
frequencyPenalty?: number | undefined;
|
28
|
+
seed?: number | undefined;
|
29
|
+
headers?: Record<string, string | undefined> | undefined;
|
30
|
+
}>;
|
31
|
+
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
32
|
+
declare const LanguageModelConfigSchema: z.ZodObject<{
|
33
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
34
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
35
|
+
modelName: z.ZodOptional<z.ZodString>;
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
37
|
+
apiKey?: string | undefined;
|
38
|
+
baseUrl?: string | undefined;
|
39
|
+
modelName?: string | undefined;
|
40
|
+
}, {
|
41
|
+
apiKey?: string | undefined;
|
42
|
+
baseUrl?: string | undefined;
|
43
|
+
modelName?: string | undefined;
|
44
|
+
}>;
|
45
|
+
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
46
|
+
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs) => TResult | Promise<TResult>;
|
47
|
+
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
48
|
+
description?: string | undefined;
|
49
|
+
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
50
|
+
execute?: ToolExecuteFunction<TArgs, TResult>;
|
51
|
+
};
|
52
|
+
type ModelConfig = {
|
53
|
+
priority?: number | undefined;
|
54
|
+
system?: string | undefined;
|
55
|
+
tools?: Record<string, Tool<any, any>> | undefined;
|
56
|
+
callSettings?: LanguageModelV1CallSettings | undefined;
|
57
|
+
config?: LanguageModelConfig | undefined;
|
58
|
+
};
|
59
|
+
type ModelConfigProvider = {
|
60
|
+
getModelConfig: () => ModelConfig;
|
61
|
+
};
|
5
62
|
|
6
63
|
type TextContentPart = {
|
7
64
|
type: "text";
|
@@ -48,6 +105,10 @@ type ContentPartStatus = {
|
|
48
105
|
reason: "cancelled" | "length" | "content-filter" | "other" | "error";
|
49
106
|
error?: unknown;
|
50
107
|
};
|
108
|
+
type ToolCallContentPartStatus = {
|
109
|
+
type: "requires-action";
|
110
|
+
reason: "tool-calls";
|
111
|
+
} | ContentPartStatus;
|
51
112
|
type MessageStatus = {
|
52
113
|
type: "running";
|
53
114
|
} | {
|
@@ -96,61 +157,4 @@ type CoreAssistantMessage = {
|
|
96
157
|
};
|
97
158
|
type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage;
|
98
159
|
|
99
|
-
|
100
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
101
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
102
|
-
topP: z.ZodOptional<z.ZodNumber>;
|
103
|
-
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
104
|
-
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
105
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
106
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
107
|
-
}, "strip", z.ZodTypeAny, {
|
108
|
-
maxTokens?: number | undefined;
|
109
|
-
temperature?: number | undefined;
|
110
|
-
topP?: number | undefined;
|
111
|
-
presencePenalty?: number | undefined;
|
112
|
-
frequencyPenalty?: number | undefined;
|
113
|
-
seed?: number | undefined;
|
114
|
-
headers?: Record<string, string | undefined> | undefined;
|
115
|
-
}, {
|
116
|
-
maxTokens?: number | undefined;
|
117
|
-
temperature?: number | undefined;
|
118
|
-
topP?: number | undefined;
|
119
|
-
presencePenalty?: number | undefined;
|
120
|
-
frequencyPenalty?: number | undefined;
|
121
|
-
seed?: number | undefined;
|
122
|
-
headers?: Record<string, string | undefined> | undefined;
|
123
|
-
}>;
|
124
|
-
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
125
|
-
declare const LanguageModelConfigSchema: z.ZodObject<{
|
126
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
127
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
128
|
-
modelName: z.ZodOptional<z.ZodString>;
|
129
|
-
}, "strip", z.ZodTypeAny, {
|
130
|
-
apiKey?: string | undefined;
|
131
|
-
baseUrl?: string | undefined;
|
132
|
-
modelName?: string | undefined;
|
133
|
-
}, {
|
134
|
-
apiKey?: string | undefined;
|
135
|
-
baseUrl?: string | undefined;
|
136
|
-
modelName?: string | undefined;
|
137
|
-
}>;
|
138
|
-
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
139
|
-
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs) => TResult | Promise<TResult>;
|
140
|
-
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
141
|
-
description?: string | undefined;
|
142
|
-
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
143
|
-
execute?: ToolExecuteFunction<TArgs, TResult>;
|
144
|
-
};
|
145
|
-
type ModelConfig = {
|
146
|
-
priority?: number | undefined;
|
147
|
-
system?: string | undefined;
|
148
|
-
tools?: Record<string, Tool<any, any>> | undefined;
|
149
|
-
callSettings?: LanguageModelV1CallSettings | undefined;
|
150
|
-
config?: LanguageModelConfig | undefined;
|
151
|
-
};
|
152
|
-
type ModelConfigProvider = {
|
153
|
-
getModelConfig: () => ModelConfig;
|
154
|
-
};
|
155
|
-
|
156
|
-
export type { AppendMessage as A, CoreMessage as C, LanguageModelV1CallSettings as L, ModelConfigProvider as M, Tool as T, ThreadRoundtrip as a, LanguageModelConfig as b, ModelConfig as c, ThreadMessage as d, ContentPartStatus as e, TextContentPart as f };
|
160
|
+
export type { AppendMessage as A, ContentPartStatus as C, ImageContentPart as I, LanguageModelV1CallSettings as L, MessageStatus as M, ThreadAssistantContentPart as T, UIContentPart as U, ThreadRoundtrip as a, ThreadMessage as b, ModelConfig as c, ModelConfigProvider as d, TextContentPart as e, ToolCallContentPart as f, ToolCallContentPartStatus as g, CoreMessage as h, Tool as i, CoreToolCallContentPart as j, ThreadUserContentPart as k, ThreadSystemMessage as l, ThreadAssistantMessage as m, ThreadUserMessage as n, CoreUserContentPart as o, CoreAssistantContentPart as p, CoreSystemMessage as q, CoreUserMessage as r, CoreAssistantMessage as s, LanguageModelConfig as t };
|
@@ -1,7 +1,64 @@
|
|
1
|
-
import { LanguageModelV1LogProbs } from '@ai-sdk/provider';
|
2
|
-
import { ReactNode } from 'react';
|
3
1
|
import { z } from 'zod';
|
4
2
|
import { JSONSchema7 } from 'json-schema';
|
3
|
+
import { LanguageModelV1LogProbs } from '@ai-sdk/provider';
|
4
|
+
import { ReactNode } from 'react';
|
5
|
+
|
6
|
+
declare const LanguageModelV1CallSettingsSchema: z.ZodObject<{
|
7
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
8
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
9
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
10
|
+
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
11
|
+
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
12
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
13
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
15
|
+
maxTokens?: number | undefined;
|
16
|
+
temperature?: number | undefined;
|
17
|
+
topP?: number | undefined;
|
18
|
+
presencePenalty?: number | undefined;
|
19
|
+
frequencyPenalty?: number | undefined;
|
20
|
+
seed?: number | undefined;
|
21
|
+
headers?: Record<string, string | undefined> | undefined;
|
22
|
+
}, {
|
23
|
+
maxTokens?: number | undefined;
|
24
|
+
temperature?: number | undefined;
|
25
|
+
topP?: number | undefined;
|
26
|
+
presencePenalty?: number | undefined;
|
27
|
+
frequencyPenalty?: number | undefined;
|
28
|
+
seed?: number | undefined;
|
29
|
+
headers?: Record<string, string | undefined> | undefined;
|
30
|
+
}>;
|
31
|
+
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
32
|
+
declare const LanguageModelConfigSchema: z.ZodObject<{
|
33
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
34
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
35
|
+
modelName: z.ZodOptional<z.ZodString>;
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
37
|
+
apiKey?: string | undefined;
|
38
|
+
baseUrl?: string | undefined;
|
39
|
+
modelName?: string | undefined;
|
40
|
+
}, {
|
41
|
+
apiKey?: string | undefined;
|
42
|
+
baseUrl?: string | undefined;
|
43
|
+
modelName?: string | undefined;
|
44
|
+
}>;
|
45
|
+
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
46
|
+
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs) => TResult | Promise<TResult>;
|
47
|
+
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
48
|
+
description?: string | undefined;
|
49
|
+
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
50
|
+
execute?: ToolExecuteFunction<TArgs, TResult>;
|
51
|
+
};
|
52
|
+
type ModelConfig = {
|
53
|
+
priority?: number | undefined;
|
54
|
+
system?: string | undefined;
|
55
|
+
tools?: Record<string, Tool<any, any>> | undefined;
|
56
|
+
callSettings?: LanguageModelV1CallSettings | undefined;
|
57
|
+
config?: LanguageModelConfig | undefined;
|
58
|
+
};
|
59
|
+
type ModelConfigProvider = {
|
60
|
+
getModelConfig: () => ModelConfig;
|
61
|
+
};
|
5
62
|
|
6
63
|
type TextContentPart = {
|
7
64
|
type: "text";
|
@@ -48,6 +105,10 @@ type ContentPartStatus = {
|
|
48
105
|
reason: "cancelled" | "length" | "content-filter" | "other" | "error";
|
49
106
|
error?: unknown;
|
50
107
|
};
|
108
|
+
type ToolCallContentPartStatus = {
|
109
|
+
type: "requires-action";
|
110
|
+
reason: "tool-calls";
|
111
|
+
} | ContentPartStatus;
|
51
112
|
type MessageStatus = {
|
52
113
|
type: "running";
|
53
114
|
} | {
|
@@ -96,61 +157,4 @@ type CoreAssistantMessage = {
|
|
96
157
|
};
|
97
158
|
type CoreMessage = CoreSystemMessage | CoreUserMessage | CoreAssistantMessage;
|
98
159
|
|
99
|
-
|
100
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
101
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
102
|
-
topP: z.ZodOptional<z.ZodNumber>;
|
103
|
-
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
104
|
-
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
105
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
106
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
107
|
-
}, "strip", z.ZodTypeAny, {
|
108
|
-
maxTokens?: number | undefined;
|
109
|
-
temperature?: number | undefined;
|
110
|
-
topP?: number | undefined;
|
111
|
-
presencePenalty?: number | undefined;
|
112
|
-
frequencyPenalty?: number | undefined;
|
113
|
-
seed?: number | undefined;
|
114
|
-
headers?: Record<string, string | undefined> | undefined;
|
115
|
-
}, {
|
116
|
-
maxTokens?: number | undefined;
|
117
|
-
temperature?: number | undefined;
|
118
|
-
topP?: number | undefined;
|
119
|
-
presencePenalty?: number | undefined;
|
120
|
-
frequencyPenalty?: number | undefined;
|
121
|
-
seed?: number | undefined;
|
122
|
-
headers?: Record<string, string | undefined> | undefined;
|
123
|
-
}>;
|
124
|
-
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
125
|
-
declare const LanguageModelConfigSchema: z.ZodObject<{
|
126
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
127
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
128
|
-
modelName: z.ZodOptional<z.ZodString>;
|
129
|
-
}, "strip", z.ZodTypeAny, {
|
130
|
-
apiKey?: string | undefined;
|
131
|
-
baseUrl?: string | undefined;
|
132
|
-
modelName?: string | undefined;
|
133
|
-
}, {
|
134
|
-
apiKey?: string | undefined;
|
135
|
-
baseUrl?: string | undefined;
|
136
|
-
modelName?: string | undefined;
|
137
|
-
}>;
|
138
|
-
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
139
|
-
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs) => TResult | Promise<TResult>;
|
140
|
-
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
141
|
-
description?: string | undefined;
|
142
|
-
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
143
|
-
execute?: ToolExecuteFunction<TArgs, TResult>;
|
144
|
-
};
|
145
|
-
type ModelConfig = {
|
146
|
-
priority?: number | undefined;
|
147
|
-
system?: string | undefined;
|
148
|
-
tools?: Record<string, Tool<any, any>> | undefined;
|
149
|
-
callSettings?: LanguageModelV1CallSettings | undefined;
|
150
|
-
config?: LanguageModelConfig | undefined;
|
151
|
-
};
|
152
|
-
type ModelConfigProvider = {
|
153
|
-
getModelConfig: () => ModelConfig;
|
154
|
-
};
|
155
|
-
|
156
|
-
export type { AppendMessage as A, CoreMessage as C, LanguageModelV1CallSettings as L, ModelConfigProvider as M, Tool as T, ThreadRoundtrip as a, LanguageModelConfig as b, ModelConfig as c, ThreadMessage as d, ContentPartStatus as e, TextContentPart as f };
|
160
|
+
export type { AppendMessage as A, ContentPartStatus as C, ImageContentPart as I, LanguageModelV1CallSettings as L, MessageStatus as M, ThreadAssistantContentPart as T, UIContentPart as U, ThreadRoundtrip as a, ThreadMessage as b, ModelConfig as c, ModelConfigProvider as d, TextContentPart as e, ToolCallContentPart as f, ToolCallContentPartStatus as g, CoreMessage as h, Tool as i, CoreToolCallContentPart as j, ThreadUserContentPart as k, ThreadSystemMessage as l, ThreadAssistantMessage as m, ThreadUserMessage as n, CoreUserContentPart as o, CoreAssistantContentPart as p, CoreSystemMessage as q, CoreUserMessage as r, CoreAssistantMessage as s, LanguageModelConfig as t };
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use client";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __export = (target, all) => {
|
4
|
+
for (var name in all)
|
5
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
6
|
+
};
|
7
|
+
|
8
|
+
export {
|
9
|
+
__export
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=chunk-BJPOCE4O.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __export = (target, all) => {
|
4
|
+
for (var name in all)
|
5
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
6
|
+
};
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
exports.__export = __export;
|
11
|
+
//# sourceMappingURL=chunk-DCHYNTHI.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/assistant-ui/assistant-ui/packages/react/dist/chunk-DCHYNTHI.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ,IAAI,UAAU,EAAE,MAAM,CAAC,cAAc;AACrC,IAAI,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG;AAChC,EAAE,IAAI,CAAC,IAAI,KAAK,GAAG,GAAG;AACtB,IAAI,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;AACjE,CAAC;AACD;AACA;AACE;AACF,4BAAC","file":"/home/runner/work/assistant-ui/assistant-ui/packages/react/dist/chunk-DCHYNTHI.js"}
|