@agentica/chat 0.15.5 → 0.15.7

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 (50) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/{Divider-DaLcPLlq.js → Divider-U2p72sQ2.js} +1 -1
  3. package/dist/assets/_accessExpressionAsString-J5NhZ9FO.js +1 -0
  4. package/dist/assets/_isFormatUri-D80pJ-Bz.js +3162 -0
  5. package/dist/assets/bbs/index-rMAE1wxP.js +115 -0
  6. package/dist/assets/{client-BVv4NBtY.js → client-nQAh1QKo.js} +1 -1
  7. package/dist/assets/{index-BjONR16U.js → index-DmJqXwCp.js} +1 -1
  8. package/dist/assets/index-af7ihIz8.js +1641 -0
  9. package/dist/assets/shopping/index.html-DtefUuIq.js +1 -0
  10. package/dist/assets/uploader/index.html-CH6UMGAK.js +27 -0
  11. package/dist/bbs/index.html +31 -24
  12. package/dist/index.html +29 -22
  13. package/dist/shopping/index.html +32 -24
  14. package/dist/uploader/index.html +30 -22
  15. package/lib/AgenticaChatApplication.d.ts +3 -3
  16. package/lib/components/MarkdownViewer.d.ts +1 -1
  17. package/lib/examples/bbs/BbsArticleService.d.ts +2 -2
  18. package/lib/examples/bbs/BbsChatApplication.d.ts +1 -1
  19. package/lib/examples/bbs/IBbsArticle.d.ts +1 -1
  20. package/lib/examples/shopping/ShoppingChatApplication.d.ts +3 -3
  21. package/lib/examples/uploader/AgenticaChatPlaygroundApplication.d.ts +3 -2
  22. package/lib/examples/uploader/AgenticaChatUploaderMovie.d.ts +2 -2
  23. package/lib/index.mjs +155 -146
  24. package/lib/index.mjs.map +1 -1
  25. package/lib/movies/messages/AgenticaChatDescribeMessageMovie.d.ts +3 -3
  26. package/lib/movies/messages/AgenticaChatExecuteMessageMovie.d.ts +3 -3
  27. package/lib/movies/messages/AgenticaChatMessageMovie.d.ts +3 -3
  28. package/lib/movies/messages/AgenticaChatSelectMessageMovie.d.ts +3 -3
  29. package/lib/movies/messages/AgenticaChatTextMessageMovie.d.ts +2 -2
  30. package/lib/movies/sides/AgenticaChatFunctionStackSideMovie.d.ts +3 -3
  31. package/lib/movies/sides/AgenticaChatSideMovie.d.ts +3 -3
  32. package/lib/movies/sides/AgenticaChatTokenUsageSideMovie.d.ts +2 -2
  33. package/package.json +21 -22
  34. package/src/AgenticaChatApplication.tsx +4 -6
  35. package/src/README.md +5 -2
  36. package/src/components/MarkdownViewer.tsx +2 -2
  37. package/src/movies/AgenticaChatMovie.tsx +22 -22
  38. package/src/movies/messages/AgenticaChatDescribeMessageMovie.tsx +10 -8
  39. package/src/movies/messages/AgenticaChatExecuteMessageMovie.tsx +14 -10
  40. package/src/movies/messages/AgenticaChatMessageMovie.tsx +12 -9
  41. package/src/movies/messages/AgenticaChatSelectMessageMovie.tsx +18 -15
  42. package/src/movies/messages/AgenticaChatTextMessageMovie.tsx +5 -4
  43. package/src/movies/sides/AgenticaChatFunctionStackSideMovie.tsx +7 -8
  44. package/src/movies/sides/AgenticaChatSideMovie.tsx +36 -26
  45. package/src/movies/sides/AgenticaChatTokenUsageSideMovie.tsx +22 -14
  46. package/dist/assets/AgenticaChatApplication-lWIm50QF.js +0 -4821
  47. package/dist/assets/_isFormatUri-YqTfGpHo.js +0 -1
  48. package/dist/assets/bbs/index-DQHKfogj.js +0 -97
  49. package/dist/assets/shopping/index.html-FHl0O6gf.js +0 -1
  50. package/dist/assets/uploader/index.html-CIM-e8Kh.js +0 -27
package/package.json CHANGED
@@ -1,14 +1,18 @@
1
1
  {
2
- "type": "module",
3
2
  "name": "@agentica/chat",
4
- "version": "0.15.5",
5
- "main": "./lib/index.mjs",
6
- "typings": "./lib/index.d.ts",
3
+ "type": "module",
4
+ "version": "0.15.7",
7
5
  "description": "Frontend Application of Agentica",
6
+ "author": "Wrtn Technologies",
7
+ "license": "MIT",
8
+ "homepage": "https://wrtnlabs.io/agentica",
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "https://github.com/wrtnlabs/agentica"
11
12
  },
13
+ "bugs": {
14
+ "url": "https://github.com/wrtnlabs/agentica/issues"
15
+ },
12
16
  "keywords": [
13
17
  "openapi",
14
18
  "swagger",
@@ -19,12 +23,17 @@
19
23
  "nestjs",
20
24
  "nestia"
21
25
  ],
22
- "author": "Wrtn Technologies",
23
- "license": "MIT",
24
- "bugs": {
25
- "url": "https://github.com/wrtnlabs/agentica/issues"
26
- },
27
- "homepage": "https://wrtnlabs.io/agentica",
26
+ "main": "./lib/index.mjs",
27
+ "typings": "./lib/index.d.ts",
28
+ "files": [
29
+ "!src/examples",
30
+ "LICENSE",
31
+ "README.md",
32
+ "dist",
33
+ "lib",
34
+ "package.json",
35
+ "src"
36
+ ],
28
37
  "dependencies": {
29
38
  "@mui/icons-material": "^6.4.0",
30
39
  "@mui/material": "^6.4.0",
@@ -37,7 +46,7 @@
37
46
  "remark-mermaid-plugin": "^1.0.2",
38
47
  "typia": "^8.1.1",
39
48
  "uuid": "^11.0.5",
40
- "@agentica/core": "^0.15.5"
49
+ "@agentica/core": "^0.15.7"
41
50
  },
42
51
  "devDependencies": {
43
52
  "@eslint/js": "^9.13.0",
@@ -52,13 +61,12 @@
52
61
  "@types/react-json-editor-ajrm": "^2.5.6",
53
62
  "@types/uuid": "^10.0.0",
54
63
  "@vitejs/plugin-react": "^4.3.3",
55
- "eslint": "^9.23.0",
56
64
  "eslint-plugin-react-hooks": "^5.0.0",
57
65
  "eslint-plugin-react-refresh": "^0.4.13",
58
66
  "gh-pages": "^6.3.0",
59
67
  "globals": "^15.11.0",
60
68
  "js-yaml": "^4.1.0",
61
- "openai": "^4.82.0",
69
+ "openai": "^4.80.0",
62
70
  "react": "^18.3.1",
63
71
  "react-dom": "^18.3.1",
64
72
  "react-json-editor-ajrm": "^2.5.14",
@@ -70,15 +78,6 @@
70
78
  "typescript-eslint": "^8.10.0",
71
79
  "vite": "^5.4.9"
72
80
  },
73
- "files": [
74
- "README.md",
75
- "LICENSE",
76
- "package.json",
77
- "dist",
78
- "lib",
79
- "src",
80
- "!src/examples"
81
- ],
82
81
  "scripts": {
83
82
  "build": "npm run build:static && npm run build:lib",
84
83
  "build:static": "rimraf dist && tsc -b && vite build",
@@ -1,13 +1,11 @@
1
- import { Agentica } from "@agentica/core";
2
- import { ILlmSchema } from "@samchon/openapi";
1
+ import type { Agentica } from "@agentica/core";
2
+ import type { ILlmSchema } from "@samchon/openapi";
3
3
 
4
4
  import { AgenticaChatMovie } from "./movies/AgenticaChatMovie";
5
5
 
6
- export const AgenticaChatApplication = <Model extends ILlmSchema.Model>(
7
- props: AgenticaChatApplication.IProps<Model>,
8
- ) => {
6
+ export function AgenticaChatApplication<Model extends ILlmSchema.Model>(props: AgenticaChatApplication.IProps<Model>) {
9
7
  return <AgenticaChatMovie {...props} />;
10
- };
8
+ }
11
9
  export namespace AgenticaChatApplication {
12
10
  export interface IProps<Model extends ILlmSchema.Model> {
13
11
  agent: Agentica<Model>;
package/src/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Agentica Chat Application
2
+
2
3
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/wrtnlabs/agentica/blob/master/LICENSE)
3
4
  [![npm version](https://img.shields.io/npm/v/@agentica/chat.svg)](https://www.npmjs.com/package/@agentica/chat)
4
5
  [![Downloads](https://img.shields.io/npm/dm/@agentica/chat.svg)](https://www.npmjs.com/package/@agentica/chat)
@@ -8,6 +9,8 @@ A frontend application of Agentica chatbot for rapid demonstration.
8
9
 
9
10
  This is not for final production, but just for demonstration. So please do not use this package globally. You have to utilize this package only for the internal demonstration.
10
11
 
12
+ <!-- eslint-skip -->
13
+
11
14
  ```tsx
12
15
  import { Agentica } from "@agentica/core";
13
16
  import { AgenticaChatApplication } from "@agentica/chat";
@@ -15,11 +18,11 @@ import typia from "typia";
15
18
 
16
19
  const agent = new Agentica({ ... });
17
20
  ReactDOM.render(
18
- <AgenticaChatApplication agent={agent} />,
21
+ <AgenticaChatApplication agent={agent} />,
19
22
  document.body,
20
23
  );
21
24
  ```
22
25
 
23
26
  > https://github.com/user-attachments/assets/01604b53-aca4-41cb-91aa-3faf63549ea6
24
27
  >
25
- > Demonstration video of Shopping AI Chatbot
28
+ > Demonstration video of Shopping AI Chatbot
@@ -3,7 +3,7 @@ import rehypeRaw from "rehype-raw";
3
3
  import rehypeStringify from "rehype-stringify";
4
4
  import remarkMermaidPlugin from "remark-mermaid-plugin";
5
5
 
6
- export const MarkdownViewer = (props: MarkdownViewer.IProps) => {
6
+ export function MarkdownViewer(props: MarkdownViewer.IProps) {
7
7
  return (
8
8
  <Markdown
9
9
  remarkPlugins={[remarkMermaidPlugin as any]}
@@ -24,7 +24,7 @@ export const MarkdownViewer = (props: MarkdownViewer.IProps) => {
24
24
  {props.children}
25
25
  </Markdown>
26
26
  );
27
- };
27
+ }
28
28
  export namespace MarkdownViewer {
29
29
  export interface IProps {
30
30
  children: string | null | undefined;
@@ -1,3 +1,10 @@
1
+ import type { Agentica, AgenticaDescribeEvent, AgenticaOperationSelection, AgenticaPrompt, AgenticaSelectEvent, AgenticaTextEvent, AgenticaTokenUsage, AgenticaValidateEvent } from "@agentica/core";
2
+ import type {
3
+ Theme,
4
+ } from "@mui/material";
5
+ import type { ILlmSchema } from "@samchon/openapi";
6
+ import type { ReactElement } from "react";
7
+
1
8
  import AddAPhotoIcon from "@mui/icons-material/AddAPhoto";
2
9
  import ReceiptLongIcon from "@mui/icons-material/ReceiptLong";
3
10
  import SendIcon from "@mui/icons-material/Send";
@@ -16,13 +23,6 @@ import {
16
23
  import { toPng } from "html-to-image";
17
24
  import React, { useEffect, useRef, useState } from "react";
18
25
 
19
- import type { Agentica, AgenticaDescribeEvent, AgenticaOperationSelection, AgenticaPrompt, AgenticaSelectEvent, AgenticaTextEvent, AgenticaTokenUsage, AgenticaValidateEvent } from "@agentica/core";
20
- import type {
21
- Theme,
22
- } from "@mui/material";
23
- import type { ILlmSchema } from "@samchon/openapi";
24
- import type { ReactElement } from "react";
25
-
26
26
  import { AgenticaChatMessageMovie } from "./messages/AgenticaChatMessageMovie";
27
27
  import { AgenticaChatSideMovie } from "./sides/AgenticaChatSideMovie";
28
28
 
@@ -102,17 +102,6 @@ export function AgenticaChatMovie<Model extends ILlmSchema.Model>({
102
102
  }, []);
103
103
 
104
104
  // EVENT HANDLERS
105
- const handleKeyUp = async (event: React.KeyboardEvent<HTMLInputElement>) => {
106
- if (event.key === "Enter" && event.shiftKey === false) {
107
- if (enabled === false) {
108
- event.preventDefault();
109
- }
110
- else {
111
- await conversate();
112
- }
113
- }
114
- };
115
-
116
105
  const handleResize = () => {
117
106
  setTimeout(() => {
118
107
  if (
@@ -173,6 +162,17 @@ export function AgenticaChatMovie<Model extends ILlmSchema.Model>({
173
162
  setSelections(selections);
174
163
  };
175
164
 
165
+ const handleKeyUp = async (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {
166
+ if (event.key === "Enter" && event.shiftKey === false) {
167
+ if (enabled === false) {
168
+ event.preventDefault();
169
+ }
170
+ else {
171
+ await conversate();
172
+ }
173
+ }
174
+ };
175
+
176
176
  const capture = async () => {
177
177
  if (bodyContainerRef.current === null) {
178
178
  return;
@@ -251,7 +251,7 @@ export function AgenticaChatMovie<Model extends ILlmSchema.Model>({
251
251
  {isMobile
252
252
  ? (
253
253
  <>
254
- <IconButton onClick={capture}>
254
+ <IconButton onClick={void capture}>
255
255
  <AddAPhotoIcon />
256
256
  </IconButton>
257
257
  <IconButton onClick={() => setOpenSide(true)}>
@@ -263,7 +263,7 @@ export function AgenticaChatMovie<Model extends ILlmSchema.Model>({
263
263
  <Button
264
264
  color="inherit"
265
265
  startIcon={<AddAPhotoIcon />}
266
- onClick={capture}
266
+ onClick={void capture}
267
267
  >
268
268
  Screenshot Capture
269
269
  </Button>
@@ -312,7 +312,7 @@ export function AgenticaChatMovie<Model extends ILlmSchema.Model>({
312
312
  placeholder="Conversate with AI Chatbot"
313
313
  value={text}
314
314
  multiline={true}
315
- onKeyUp={handleKeyUp}
315
+ onKeyUp={e => void handleKeyUp(e)}
316
316
  onChange={(e) => {
317
317
  setText(e.target.value);
318
318
  handleResize();
@@ -323,7 +323,7 @@ export function AgenticaChatMovie<Model extends ILlmSchema.Model>({
323
323
  style={{ marginLeft: 10 }}
324
324
  startIcon={<SendIcon />}
325
325
  disabled={!enabled}
326
- onClick={conversate}
326
+ onClick={void conversate}
327
327
  >
328
328
  Send
329
329
  </Button>
@@ -1,4 +1,6 @@
1
- import { AgenticaDescribePrompt } from "@agentica/core";
1
+ import type { AgenticaDescribePrompt } from "@agentica/core";
2
+ import type { ILlmSchema } from "@samchon/openapi";
3
+
2
4
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
3
5
  import {
4
6
  Button,
@@ -8,17 +10,17 @@ import {
8
10
  Chip,
9
11
  Collapse,
10
12
  } from "@mui/material";
11
- import { ILlmSchema } from "@samchon/openapi";
12
13
  import { useState } from "react";
13
14
 
14
15
  import { MarkdownViewer } from "../../components/MarkdownViewer";
16
+
15
17
  import { AgenticaChatExecuteMessageMovie } from "./AgenticaChatExecuteMessageMovie";
16
18
 
17
- export const AgenticaChatDescribeMessageMovie = <
19
+ export function AgenticaChatDescribeMessageMovie<
18
20
  Model extends ILlmSchema.Model,
19
21
  >({
20
22
  prompt,
21
- }: AgenticaChatDescribeMessageMovie.IProps<Model>) => {
23
+ }: AgenticaChatDescribeMessageMovie.IProps<Model>) {
22
24
  const [expanded, setExpanded] = useState(false);
23
25
  return (
24
26
  <Card
@@ -35,13 +37,13 @@ export const AgenticaChatDescribeMessageMovie = <
35
37
  </CardContent>
36
38
  <CardActions style={{ textAlign: "right" }}>
37
39
  <Button
38
- startIcon={
40
+ startIcon={(
39
41
  <ExpandMoreIcon
40
42
  style={{
41
43
  transform: `rotate(${expanded ? 180 : 0}deg)`,
42
44
  }}
43
45
  />
44
- }
46
+ )}
45
47
  onClick={() => setExpanded(!expanded)}
46
48
  >
47
49
  {expanded ? "Hide Function Calls" : "Show Function Calls"}
@@ -49,14 +51,14 @@ export const AgenticaChatDescribeMessageMovie = <
49
51
  </CardActions>
50
52
  <Collapse in={expanded} timeout="auto" unmountOnExit>
51
53
  <CardContent>
52
- {prompt.executes.map((execute) => (
54
+ {prompt.executes.map(execute => (
53
55
  <AgenticaChatExecuteMessageMovie execute={execute} />
54
56
  ))}
55
57
  </CardContent>
56
58
  </Collapse>
57
59
  </Card>
58
60
  );
59
- };
61
+ }
60
62
  export namespace AgenticaChatDescribeMessageMovie {
61
63
  export interface IProps<Model extends ILlmSchema.Model> {
62
64
  prompt: AgenticaDescribePrompt<Model>;
@@ -1,18 +1,23 @@
1
- import { AgenticaExecutePrompt } from "@agentica/core";
1
+ import type { AgenticaExecutePrompt } from "@agentica/core";
2
+ import type { ILlmSchema } from "@samchon/openapi";
3
+
2
4
  import { Typography } from "@mui/material";
3
- import { ILlmSchema } from "@samchon/openapi";
4
5
  import React from "react";
5
6
 
6
7
  import { MarkdownViewer } from "../../components/MarkdownViewer";
7
8
 
8
- export const AgenticaChatExecuteMessageMovie = <
9
+ export function AgenticaChatExecuteMessageMovie<
9
10
  Model extends ILlmSchema.Model,
10
11
  >({
11
12
  execute,
12
- }: AgenticaChatExecuteMessageMovie.IProps<Model>) => {
13
+ }: AgenticaChatExecuteMessageMovie.IProps<Model>) {
13
14
  return (
14
15
  <React.Fragment>
15
- <Typography variant="h5"> {getTitle(execute)} </Typography>
16
+ <Typography variant="h5">
17
+ {" "}
18
+ {getTitle(execute)}
19
+ {" "}
20
+ </Typography>
16
21
  <hr />
17
22
  <Typography variant="h6"> Description </Typography>
18
23
  <MarkdownViewer>{execute.operation.function.description}</MarkdownViewer>
@@ -30,16 +35,15 @@ export const AgenticaChatExecuteMessageMovie = <
30
35
  </MarkdownViewer>
31
36
  </React.Fragment>
32
37
  );
33
- };
38
+ }
34
39
  export namespace AgenticaChatExecuteMessageMovie {
35
40
  export interface IProps<Model extends ILlmSchema.Model> {
36
41
  execute: AgenticaExecutePrompt<Model>;
37
42
  }
38
43
  }
39
44
 
40
- const getTitle = <Model extends ILlmSchema.Model>(
41
- exec: AgenticaExecutePrompt<Model>,
42
- ) =>
43
- exec.operation.protocol === "http"
45
+ function getTitle<Model extends ILlmSchema.Model>(exec: AgenticaExecutePrompt<Model>) {
46
+ return exec.operation.protocol === "http"
44
47
  ? `${exec.operation.function.method.toUpperCase()} ${exec.operation.function.path}`
45
48
  : exec.operation.function.name;
49
+ }
@@ -1,23 +1,26 @@
1
- import { AgenticaPrompt } from "@agentica/core";
2
- import { ILlmSchema } from "@samchon/openapi";
1
+ import type { AgenticaPrompt } from "@agentica/core";
2
+ import type { ILlmSchema } from "@samchon/openapi";
3
3
 
4
4
  import { AgenticaChatDescribeMessageMovie } from "./AgenticaChatDescribeMessageMovie";
5
5
  import { AgenticaChatSelectMessageMovie } from "./AgenticaChatSelectMessageMovie";
6
6
  import { AgenticaChatTextMessageMovie } from "./AgenticaChatTextMessageMovie";
7
7
 
8
- export const AgenticaChatMessageMovie = <Model extends ILlmSchema.Model>({
8
+ export function AgenticaChatMessageMovie<Model extends ILlmSchema.Model>({
9
9
  prompt,
10
- }: AgenticaChatMessageMovie.IProps<Model>) => {
11
- if (prompt.type === "text")
10
+ }: AgenticaChatMessageMovie.IProps<Model>) {
11
+ if (prompt.type === "text") {
12
12
  return <AgenticaChatTextMessageMovie prompt={prompt} />;
13
- else if (prompt.type === "select")
14
- return prompt.selections.map((selection) => (
13
+ }
14
+ else if (prompt.type === "select") {
15
+ return prompt.selections.map(selection => (
15
16
  <AgenticaChatSelectMessageMovie selection={selection} />
16
17
  ));
17
- else if (prompt.type === "describe")
18
+ }
19
+ else if (prompt.type === "describe") {
18
20
  return <AgenticaChatDescribeMessageMovie prompt={prompt} />;
21
+ }
19
22
  return null;
20
- };
23
+ }
21
24
  export namespace AgenticaChatMessageMovie {
22
25
  export interface IProps<Model extends ILlmSchema.Model> {
23
26
  prompt: AgenticaPrompt<Model>;
@@ -1,4 +1,6 @@
1
- import { AgenticaOperationSelection } from "@agentica/core";
1
+ import type { AgenticaOperationSelection } from "@agentica/core";
2
+ import type { ILlmSchema } from "@samchon/openapi";
3
+
2
4
  import GradingIcon from "@mui/icons-material/Grading";
3
5
  import {
4
6
  Button,
@@ -8,14 +10,13 @@ import {
8
10
  Chip,
9
11
  Collapse,
10
12
  } from "@mui/material";
11
- import { ILlmSchema } from "@samchon/openapi";
12
13
  import { useState } from "react";
13
14
 
14
15
  import { MarkdownViewer } from "../../components/MarkdownViewer";
15
16
 
16
- export const AgenticaChatSelectMessageMovie = <Model extends ILlmSchema.Model>({
17
+ export function AgenticaChatSelectMessageMovie<Model extends ILlmSchema.Model>({
17
18
  selection,
18
- }: AgenticaChatSelectMessageMovie.IProps<Model>) => {
19
+ }: AgenticaChatSelectMessageMovie.IProps<Model>) {
19
20
  const [expanded, setExpanded] = useState(false);
20
21
  return (
21
22
  <Card
@@ -36,16 +37,18 @@ export const AgenticaChatSelectMessageMovie = <Model extends ILlmSchema.Model>({
36
37
  <br />
37
38
  <br />
38
39
  Operation:
39
- {selection.operation.protocol === "http" ? (
40
- <ul>
41
- <li>{selection.operation.function.method.toUpperCase()}</li>
42
- <li>{selection.operation.function.path}</li>
43
- </ul>
44
- ) : (
45
- <ul>
46
- <li>{selection.operation.function.name}</li>
47
- </ul>
48
- )}
40
+ {selection.operation.protocol === "http"
41
+ ? (
42
+ <ul>
43
+ <li>{selection.operation.function.method.toUpperCase()}</li>
44
+ <li>{selection.operation.function.path}</li>
45
+ </ul>
46
+ )
47
+ : (
48
+ <ul>
49
+ <li>{selection.operation.function.name}</li>
50
+ </ul>
51
+ )}
49
52
  <MarkdownViewer>{selection.reason}</MarkdownViewer>
50
53
  </CardContent>
51
54
  <CardActions style={{ textAlign: "right" }}>
@@ -62,7 +65,7 @@ export const AgenticaChatSelectMessageMovie = <Model extends ILlmSchema.Model>({
62
65
  </Collapse>
63
66
  </Card>
64
67
  );
65
- };
68
+ }
66
69
  export namespace AgenticaChatSelectMessageMovie {
67
70
  export interface IProps<Model extends ILlmSchema.Model> {
68
71
  selection: AgenticaOperationSelection<Model>;
@@ -1,13 +1,14 @@
1
- import { AgenticaTextPrompt } from "@agentica/core";
1
+ import type { AgenticaTextPrompt } from "@agentica/core";
2
+
2
3
  import FaceIcon from "@mui/icons-material/Face";
3
4
  import SmartToyIcon from "@mui/icons-material/SmartToy";
4
5
  import { Card, CardContent, Chip } from "@mui/material";
5
6
 
6
7
  import { MarkdownViewer } from "../../components/MarkdownViewer";
7
8
 
8
- export const AgenticaChatTextMessageMovie = ({
9
+ export function AgenticaChatTextMessageMovie({
9
10
  prompt,
10
- }: AgenticaChatTextMessageMovie.IProps) => {
11
+ }: AgenticaChatTextMessageMovie.IProps) {
11
12
  return (
12
13
  <div
13
14
  style={{
@@ -38,7 +39,7 @@ export const AgenticaChatTextMessageMovie = ({
38
39
  </Card>
39
40
  </div>
40
41
  );
41
- };
42
+ }
42
43
  export namespace AgenticaChatTextMessageMovie {
43
44
  export interface IProps {
44
45
  prompt: AgenticaTextPrompt;
@@ -1,4 +1,6 @@
1
- import { AgenticaOperationSelection } from "@agentica/core";
1
+ import type { AgenticaOperationSelection } from "@agentica/core";
2
+ import type { ILlmSchema } from "@samchon/openapi";
3
+
2
4
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
3
5
  import {
4
6
  Accordion,
@@ -6,21 +8,18 @@ import {
6
8
  AccordionSummary,
7
9
  Typography,
8
10
  } from "@mui/material";
9
- import { ILlmSchema } from "@samchon/openapi";
10
11
  import React from "react";
11
12
 
12
13
  import { MarkdownViewer } from "../../components/MarkdownViewer";
13
14
 
14
- export const AgenticaChatFunctionStackSideMovie = <
15
+ export function AgenticaChatFunctionStackSideMovie<
15
16
  Model extends ILlmSchema.Model,
16
- >(
17
- props: AgenticaChatFunctionStackSideMovie.IProps<Model>,
18
- ) => {
17
+ >(props: AgenticaChatFunctionStackSideMovie.IProps<Model>) {
19
18
  return (
20
19
  <React.Fragment>
21
20
  <Typography variant="h5"> Function Stack </Typography>
22
21
  <hr />
23
- {props.selections.map((select) => (
22
+ {props.selections.map(select => (
24
23
  <Accordion>
25
24
  <AccordionSummary expandIcon={<ExpandMoreIcon />}>
26
25
  <Typography component="h6">
@@ -42,7 +41,7 @@ export const AgenticaChatFunctionStackSideMovie = <
42
41
  ))}
43
42
  </React.Fragment>
44
43
  );
45
- };
44
+ }
46
45
  export namespace AgenticaChatFunctionStackSideMovie {
47
46
  export interface IProps<Model extends ILlmSchema.Model> {
48
47
  selections: AgenticaOperationSelection<Model>[];
@@ -1,48 +1,58 @@
1
- import {
1
+ import type {
2
2
  AgenticaOperationSelection,
3
3
  AgenticaTokenUsage,
4
4
  IAgenticaConfig,
5
5
  IAgenticaVendor,
6
6
  } from "@agentica/core";
7
+ import type { ILlmSchema } from "@samchon/openapi";
8
+
7
9
  import { Typography } from "@mui/material";
8
- import { ILlmSchema } from "@samchon/openapi";
9
10
 
10
11
  import { AgenticaChatFunctionStackSideMovie } from "./AgenticaChatFunctionStackSideMovie";
11
12
  import { AgenticaChatTokenUsageSideMovie } from "./AgenticaChatTokenUsageSideMovie";
12
13
 
13
- export const AgenticaChatSideMovie = <Model extends ILlmSchema.Model>(
14
- props: AgenticaChatSideMovie.IProps<Model>,
15
- ) => {
14
+ export function AgenticaChatSideMovie<Model extends ILlmSchema.Model>(props: AgenticaChatSideMovie.IProps<Model>) {
16
15
  return (
17
16
  <div
18
17
  style={{
19
18
  padding: 25,
20
19
  }}
21
20
  >
22
- {props.error !== null ? (
23
- <>
24
- <Typography variant="h5" color="error">
25
- OpenAI Error
26
- </Typography>
27
- <hr />
28
- {props.error.message}
29
- <br />
30
- <br />
31
- Your OpenAI API key may not valid.
32
- <br />
33
- <br />
34
- <br />
35
- </>
36
- ) : null}
21
+ {props.error !== null
22
+ ? (
23
+ <>
24
+ <Typography variant="h5" color="error">
25
+ OpenAI Error
26
+ </Typography>
27
+ <hr />
28
+ {props.error.message}
29
+ <br />
30
+ <br />
31
+ Your OpenAI API key may not valid.
32
+ <br />
33
+ <br />
34
+ <br />
35
+ </>
36
+ )
37
+ : null}
37
38
  <Typography variant="h5">Agent Information</Typography>
38
39
  <hr />
39
40
  <ul>
40
- <li> Model: {props.vendor.model} </li>
41
- <li> Locale: {props.config?.locale ?? navigator.language} </li>
42
41
  <li>
43
- Timezone:{" "}
44
- {props.config?.timezone ??
45
- Intl.DateTimeFormat().resolvedOptions().timeZone}
42
+ {" "}
43
+ Model:
44
+ {props.vendor.model}
45
+ </li>
46
+ <li>
47
+ {" "}
48
+ Locale:
49
+ {props.config?.locale ?? navigator.language}
50
+ </li>
51
+ <li>
52
+ Timezone:
53
+ {" "}
54
+ {props.config?.timezone
55
+ ?? Intl.DateTimeFormat().resolvedOptions().timeZone}
46
56
  </li>
47
57
  </ul>
48
58
  <br />
@@ -53,7 +63,7 @@ export const AgenticaChatSideMovie = <Model extends ILlmSchema.Model>(
53
63
  <AgenticaChatFunctionStackSideMovie selections={props.selections} />
54
64
  </div>
55
65
  );
56
- };
66
+ }
57
67
  export namespace AgenticaChatSideMovie {
58
68
  export interface IProps<Model extends ILlmSchema.Model> {
59
69
  vendor: IAgenticaVendor;