This is Langchain implementation using NestJS for backend and NextJS for frontend.
First, run the following command to go to the client directory:
cd ./clientNow run the following command to install the dependencies:
npm iNow set the environment variable in .env file.
NEXT_PUBLIC_SERVER_URL=(server url)
# 5001 is the socket server port
NEXT_PUBLIC_SOCKET_SERVER_URL=<server_url>:5001
To run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
First, run the following command to go to the server directory:
cd ./serverNow run the following command to install the dependencies:
npm iNow set the environment variables in .env file. Some of the environment variables are left as default:
PORT=(port to run the server on)
SOCKET_PORT=(socket port to run socket on)
MONGODB_URL=(mongodb connection url)
JWT_SECRET_KEY=(jwt secret keys)
DEVELOPER_EMAIL=(developers email separated by comma)
OPENAI_API_KEY=(open ai api key)
EMBEDDINGS_MODEL_NAME=text-embedding-ada-002
PERSIST_DIRECTORY=./lancedb
CHAT_MODEL_NAME=gpt-4
CHATBOT_TO_CONNECT_INFINITY_SERVER_STRING=(base64 generated string)
VECTORSTORE_COLLECTION_NAME=(collection name to infer by the ai)
VECTORSTORE_URL=(url to the vectorstore)To run the development server:
npm run start:devThe development server will now run on the localhost with the port defined on .env file.