@agentica/chat 0.10.4 → 0.11.1
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.
- package/dist/assets/AgenticaChatApplication-DkstxT-S.js +4072 -0
- package/dist/assets/{OpenApi-CGA4MzNI.js → OpenApi-Dar2k8cb.js} +1 -1
- package/dist/assets/bbs/{index-4PK4AnVx.js → index-BKyXcr4r.js} +1 -1
- package/dist/assets/shopping/index.html-CxRAYtIl.js +1 -0
- package/dist/assets/uploader/{index.html-CWQwfKre.js → index.html-Bsx-chqu.js} +1 -1
- package/dist/bbs/index.html +2 -2
- package/dist/shopping/index.html +3 -3
- package/dist/uploader/index.html +3 -3
- package/lib/index.mjs +23 -33
- package/lib/index.mjs.map +1 -1
- package/lib/movies/messages/AgenticaChatDescribeMessageMovie.d.ts +2 -2
- package/lib/movies/messages/AgenticaChatExecuteMessageMovie.d.ts +2 -2
- package/lib/movies/messages/AgenticaChatMessageMovie.d.ts +2 -2
- package/lib/movies/messages/AgenticaChatSelectMessageMovie.d.ts +2 -2
- package/lib/movies/messages/AgenticaChatTextMessageMovie.d.ts +2 -2
- package/lib/movies/sides/AgenticaChatFunctionStackSideMovie.d.ts +2 -2
- package/lib/movies/sides/AgenticaChatSideMovie.d.ts +3 -3
- package/lib/movies/sides/AgenticaChatTokenUsageSideMovie.d.ts +2 -2
- package/package.json +2 -2
- package/src/movies/AgenticaChatMovie.tsx +24 -34
- package/src/movies/messages/AgenticaChatDescribeMessageMovie.tsx +6 -4
- package/src/movies/messages/AgenticaChatExecuteMessageMovie.tsx +10 -8
- package/src/movies/messages/AgenticaChatMessageMovie.tsx +3 -3
- package/src/movies/messages/AgenticaChatSelectMessageMovie.tsx +9 -7
- package/src/movies/messages/AgenticaChatTextMessageMovie.tsx +2 -2
- package/src/movies/sides/AgenticaChatFunctionStackSideMovie.tsx +11 -7
- package/src/movies/sides/AgenticaChatSideMovie.tsx +4 -4
- package/src/movies/sides/AgenticaChatTokenUsageSideMovie.tsx +3 -3
- package/dist/assets/AgenticaChatApplication-DdzM9BYl.js +0 -4072
- package/dist/assets/shopping/index.html-DBj6ogT_.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgenticaOperationSelection } from "@agentica/core";
|
|
2
2
|
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
3
3
|
import {
|
|
4
4
|
Accordion,
|
|
@@ -11,7 +11,9 @@ import React from "react";
|
|
|
11
11
|
|
|
12
12
|
import { MarkdownViewer } from "../../components/MarkdownViewer";
|
|
13
13
|
|
|
14
|
-
export const AgenticaChatFunctionStackSideMovie = <
|
|
14
|
+
export const AgenticaChatFunctionStackSideMovie = <
|
|
15
|
+
Model extends ILlmSchema.Model,
|
|
16
|
+
>(
|
|
15
17
|
props: AgenticaChatFunctionStackSideMovie.IProps<Model>,
|
|
16
18
|
) => {
|
|
17
19
|
return (
|
|
@@ -22,9 +24,9 @@ export const AgenticaChatFunctionStackSideMovie = <Model extends ILlmSchema.Mode
|
|
|
22
24
|
<Accordion>
|
|
23
25
|
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
|
24
26
|
<Typography component="h6">
|
|
25
|
-
{select.protocol === "http"
|
|
26
|
-
? `${select.function.method.toUpperCase()} ${select.function.path}`
|
|
27
|
-
: select.function.name}
|
|
27
|
+
{select.operation.protocol === "http"
|
|
28
|
+
? `${select.operation.function.method.toUpperCase()} ${select.operation.function.path}`
|
|
29
|
+
: select.operation.function.name}
|
|
28
30
|
</Typography>
|
|
29
31
|
</AccordionSummary>
|
|
30
32
|
<AccordionDetails>
|
|
@@ -32,7 +34,9 @@ export const AgenticaChatFunctionStackSideMovie = <Model extends ILlmSchema.Mode
|
|
|
32
34
|
{select.reason}
|
|
33
35
|
<br />
|
|
34
36
|
<br />
|
|
35
|
-
<MarkdownViewer>
|
|
37
|
+
<MarkdownViewer>
|
|
38
|
+
{select.operation.function.description}
|
|
39
|
+
</MarkdownViewer>
|
|
36
40
|
</AccordionDetails>
|
|
37
41
|
</Accordion>
|
|
38
42
|
))}
|
|
@@ -41,6 +45,6 @@ export const AgenticaChatFunctionStackSideMovie = <Model extends ILlmSchema.Mode
|
|
|
41
45
|
};
|
|
42
46
|
export namespace AgenticaChatFunctionStackSideMovie {
|
|
43
47
|
export interface IProps<Model extends ILlmSchema.Model> {
|
|
44
|
-
selections:
|
|
48
|
+
selections: AgenticaOperationSelection<Model>[];
|
|
45
49
|
}
|
|
46
50
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AgenticaOperationSelection,
|
|
3
|
+
AgenticaTokenUsage,
|
|
2
4
|
IAgenticaConfig,
|
|
3
|
-
IAgenticaOperationSelection,
|
|
4
|
-
IAgenticaTokenUsage,
|
|
5
5
|
IAgenticaVendor,
|
|
6
6
|
} from "@agentica/core";
|
|
7
7
|
import { Typography } from "@mui/material";
|
|
@@ -58,8 +58,8 @@ export namespace AgenticaChatSideMovie {
|
|
|
58
58
|
export interface IProps<Model extends ILlmSchema.Model> {
|
|
59
59
|
vendor: IAgenticaVendor;
|
|
60
60
|
config: IAgenticaConfig<Model> | undefined;
|
|
61
|
-
usage:
|
|
62
|
-
selections:
|
|
61
|
+
usage: AgenticaTokenUsage;
|
|
62
|
+
selections: AgenticaOperationSelection<Model>[];
|
|
63
63
|
error: Error | null;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgenticaTokenUsage } from "@agentica/core";
|
|
2
2
|
import {
|
|
3
3
|
Table,
|
|
4
4
|
TableBody,
|
|
@@ -54,7 +54,7 @@ export const AgenticaChatTokenUsageSideMovie = (
|
|
|
54
54
|
};
|
|
55
55
|
export namespace AgenticaChatTokenUsageSideMovie {
|
|
56
56
|
export interface IProps {
|
|
57
|
-
usage:
|
|
57
|
+
usage: AgenticaTokenUsage;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ interface IPrice {
|
|
|
64
64
|
completion: number;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
const compute = (usage:
|
|
67
|
+
const compute = (usage: AgenticaTokenUsage): IPrice => {
|
|
68
68
|
const prompt: number =
|
|
69
69
|
(usage.aggregate.input.total - usage.aggregate.input.cached) *
|
|
70
70
|
(2.5 / 1_000_000) +
|