@agentica/chat 0.10.4 → 0.11.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.
Files changed (30) hide show
  1. package/dist/assets/AgenticaChatApplication-DkstxT-S.js +4072 -0
  2. package/dist/assets/{OpenApi-CGA4MzNI.js → OpenApi-Dar2k8cb.js} +1 -1
  3. package/dist/assets/bbs/{index-4PK4AnVx.js → index-BKyXcr4r.js} +1 -1
  4. package/dist/assets/shopping/index.html-CxRAYtIl.js +1 -0
  5. package/dist/assets/uploader/{index.html-CWQwfKre.js → index.html-Bsx-chqu.js} +1 -1
  6. package/dist/bbs/index.html +2 -2
  7. package/dist/shopping/index.html +3 -3
  8. package/dist/uploader/index.html +3 -3
  9. package/lib/index.mjs +23 -33
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/movies/messages/AgenticaChatDescribeMessageMovie.d.ts +2 -2
  12. package/lib/movies/messages/AgenticaChatExecuteMessageMovie.d.ts +2 -2
  13. package/lib/movies/messages/AgenticaChatMessageMovie.d.ts +2 -2
  14. package/lib/movies/messages/AgenticaChatSelectMessageMovie.d.ts +2 -2
  15. package/lib/movies/messages/AgenticaChatTextMessageMovie.d.ts +2 -2
  16. package/lib/movies/sides/AgenticaChatFunctionStackSideMovie.d.ts +2 -2
  17. package/lib/movies/sides/AgenticaChatSideMovie.d.ts +3 -3
  18. package/lib/movies/sides/AgenticaChatTokenUsageSideMovie.d.ts +2 -2
  19. package/package.json +2 -2
  20. package/src/movies/AgenticaChatMovie.tsx +24 -34
  21. package/src/movies/messages/AgenticaChatDescribeMessageMovie.tsx +6 -4
  22. package/src/movies/messages/AgenticaChatExecuteMessageMovie.tsx +10 -8
  23. package/src/movies/messages/AgenticaChatMessageMovie.tsx +3 -3
  24. package/src/movies/messages/AgenticaChatSelectMessageMovie.tsx +9 -7
  25. package/src/movies/messages/AgenticaChatTextMessageMovie.tsx +2 -2
  26. package/src/movies/sides/AgenticaChatFunctionStackSideMovie.tsx +11 -7
  27. package/src/movies/sides/AgenticaChatSideMovie.tsx +4 -4
  28. package/src/movies/sides/AgenticaChatTokenUsageSideMovie.tsx +3 -3
  29. package/dist/assets/AgenticaChatApplication-DdzM9BYl.js +0 -4072
  30. package/dist/assets/shopping/index.html-DBj6ogT_.js +0 -1
@@ -1,4 +1,4 @@
1
- import { IAgenticaOperationSelection } from "@agentica/core";
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 = <Model extends ILlmSchema.Model>(
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>{select.function.description}</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: IAgenticaOperationSelection<Model>[];
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: IAgenticaTokenUsage;
62
- selections: IAgenticaOperationSelection<Model>[];
61
+ usage: AgenticaTokenUsage;
62
+ selections: AgenticaOperationSelection<Model>[];
63
63
  error: Error | null;
64
64
  }
65
65
  }
@@ -1,4 +1,4 @@
1
- import { IAgenticaTokenUsage } from "@agentica/core";
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: IAgenticaTokenUsage;
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: IAgenticaTokenUsage): IPrice => {
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) +