Upgrade deps (#329)
* upgrade deps * fix langchain warnings * add test for login
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { ChatPromptTemplate } from "langchain/prompts";
|
||||
import { ChatPromptTemplate } from "@langchain/core/prompts";
|
||||
import { zodToJsonSchema } from "zod-to-json-schema";
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { ChatPromptTemplate } from "langchain/prompts";
|
||||
import { ChatPromptTemplate } from "@langchain/core/prompts";
|
||||
import { z } from "zod";
|
||||
import {
|
||||
StructuredOutputParser,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { ChatPromptTemplate } from "langchain/prompts";
|
||||
import { ChatPromptTemplate } from "@langchain/core/prompts";
|
||||
import { z } from "zod";
|
||||
import {
|
||||
StructuredOutputParser,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { ChatPromptTemplate } from "langchain/prompts";
|
||||
import { ChatPromptTemplate } from "@langchain/core/prompts";
|
||||
|
||||
export const translateCommand = async (
|
||||
text: string,
|
||||
|
||||
@@ -15,10 +15,10 @@ import {
|
||||
import { Message, Speech } from "@main/db/models";
|
||||
import { ChatMessageHistory, BufferMemory } from "langchain/memory";
|
||||
import { ConversationChain } from "langchain/chains";
|
||||
import { ChatOpenAI } from "langchain/chat_models/openai";
|
||||
import { ChatOllama } from "langchain/chat_models/ollama";
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { ChatOllama } from "@langchain/community/chat_models/ollama";
|
||||
import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
|
||||
import { ChatPromptTemplate, MessagesPlaceholder } from "langchain/prompts";
|
||||
import { ChatPromptTemplate, MessagesPlaceholder } from "@langchain/core/prompts";
|
||||
import { type Generation } from "langchain/dist/schema";
|
||||
import settings from "@main/settings";
|
||||
import db from "@main/db";
|
||||
|
||||
@@ -15,10 +15,13 @@ export const Layout = () => {
|
||||
|
||||
if (!initialized) {
|
||||
return (
|
||||
<div className="h-screen flex justify-center items-center">
|
||||
<div
|
||||
className="h-screen flex justify-center items-center"
|
||||
date-testid="layout-onboarding"
|
||||
>
|
||||
<div className="text-center">
|
||||
<div className="text-lg mb-6">
|
||||
{t("welcomeTo")} <span className="font-semibold">Enjoy Bot</span>
|
||||
{t("welcomeTo")} <span className="font-semibold">Enjoy App</span>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
@@ -31,7 +34,7 @@ export const Layout = () => {
|
||||
);
|
||||
} else if (db.state === "connected") {
|
||||
return (
|
||||
<div className="min-h-screen">
|
||||
<div className="min-h-screen" data-testid="layout-home">
|
||||
<div className="flex flex-start">
|
||||
<Sidebar />
|
||||
<div className="flex-1 border-l overflow-x-hidden">
|
||||
@@ -42,7 +45,10 @@ export const Layout = () => {
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<div className="h-screen w-screen flex justify-center items-center">
|
||||
<div
|
||||
className="h-screen w-screen flex justify-center items-center"
|
||||
data-testid="layout-db-error"
|
||||
>
|
||||
<DbState />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -26,7 +26,10 @@ export const Sidebar = () => {
|
||||
const activeTab = location.pathname;
|
||||
|
||||
return (
|
||||
<div className="h-[100vh] w-20 xl:w-48 2xl:w-64 transition-all relative">
|
||||
<div
|
||||
className="h-[100vh] w-20 xl:w-48 2xl:w-64 transition-all relative"
|
||||
data-testid="sidebar"
|
||||
>
|
||||
<div className="fixed top-0 left-0 h-full w-20 xl:w-48 2xl:w-64">
|
||||
<ScrollArea className="w-full h-full">
|
||||
<div className="px-1 xl:px-3 pt-6 mb-2 flex items-center space-x-1 justify-center">
|
||||
@@ -63,7 +66,9 @@ export const Sidebar = () => {
|
||||
className="w-full xl:justify-start"
|
||||
>
|
||||
<UsersRoundIcon className="xl:mr-2 h-5 w-5" />
|
||||
<span className="hidden xl:block">{t("sidebar.community")}</span>
|
||||
<span className="hidden xl:block">
|
||||
{t("sidebar.community")}
|
||||
</span>
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -5,10 +5,13 @@ import {
|
||||
import { useContext } from "react";
|
||||
import { ChatMessageHistory, BufferMemory } from "langchain/memory";
|
||||
import { ConversationChain } from "langchain/chains";
|
||||
import { ChatOpenAI } from "langchain/chat_models/openai";
|
||||
import { ChatOllama } from "langchain/chat_models/ollama";
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { ChatOllama } from "@langchain/community/chat_models/ollama";
|
||||
import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
|
||||
import { ChatPromptTemplate, MessagesPlaceholder } from "langchain/prompts";
|
||||
import {
|
||||
ChatPromptTemplate,
|
||||
MessagesPlaceholder,
|
||||
} from "@langchain/core/prompts";
|
||||
import OpenAI from "openai";
|
||||
import { type Generation } from "langchain/dist/schema";
|
||||
import { v4 } from "uuid";
|
||||
|
||||
Reference in New Issue
Block a user