From 3f86274fdc42337bab692e3d63ac42b3a823c007 Mon Sep 17 00:00:00 2001 From: AMISH-KHAN Date: Thu, 9 May 2024 14:06:31 +0530 Subject: [PATCH] added vercel AI SDK --- package.json | 6 +++++- src/molecules/chat-ui/index.tsx | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index fe39a0d0..177fdf0c 100644 --- a/package.json +++ b/package.json @@ -14,13 +14,16 @@ "build-storybook": "storybook build" }, "dependencies": { + "@ai-sdk/openai": "^0.0.9", "@babel/preset-react": "^7.23.3", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.15.11", "@mui/material": "^5.15.11", "@samagra-x/chatui": "^1.0.3", + "ai": "^3.1.1", "bootstrap-css-only": "^4.4.1", + "dotenv": "^16.4.5", "i18next": "^23.10.0", "lodash": "^4.17.21", "moment": "^2.30.1", @@ -30,7 +33,8 @@ "react-i18next": "^14.0.5", "react-router-dom": "^6.22.2", "service-page-cli": "^0.0.29", - "storybook-addon-react-docgen": "^1.2.44" + "storybook-addon-react-docgen": "^1.2.44", + "zod": "^3.23.6" }, "devDependencies": { "@chromatic-com/storybook": "^1.2.26", diff --git a/src/molecules/chat-ui/index.tsx b/src/molecules/chat-ui/index.tsx index a544a0f5..8a0de6f5 100644 --- a/src/molecules/chat-ui/index.tsx +++ b/src/molecules/chat-ui/index.tsx @@ -10,6 +10,7 @@ import chatHistory from "./chatHistory.json"; import ShareButtons from "../share-buttons"; import { useUiConfig, useThemeConfig } from "../../hook/useConfig"; + interface ChatMessage { text: string; position: "left" | "right";