Giter Site home page Giter Site logo

amellouki / cogniverse Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 1.0 818 KB

Create LLM powered bots and port them into Discord & Slack

Home Page: https://www.cogniverse.ai/

JavaScript 0.36% Dockerfile 0.53% TypeScript 91.71% SCSS 7.40%
ai chatbot chatgpt gpt gpt-3 gpt-4 langchain langchain-js nestjs nextjs

cogniverse's Introduction

A web app that leverages LLMs through Langchain.
Pre prompt your bots and integrate them with messaging platforms such us Discord and Slack.

Pre-requisites

Node v18.16.0
npm 9.5.1

Run nvm use to use the correct node version.

Environment variables

(Follow the examples in the .env.example files)

Prisma variables

Create a .env file in /packages/backend/prisma with the following variables: (follow the example in .env.example)

  • DATABASE_URL denoting the database connection string

Backend variables

Create a .env.local file in /packages/backend with the following variables:

Security

  • PORT The port on which the backend server will run
  • ALLOWED_DOMAINS The allowed domains for CORS
  • JWT_SECRET The secret used to sign JWT tokens

OpenAI

  • OPEN_AI_API_KEY Your organization's openAI api key

Pinecone

  • PINECONE_API_KEY Your Pinecone api key
  • PINECONE_INDEX Your Pinecone index name
  • PINECONE_ENVIRONMENT Your Pinecone environment name

Authentication

  • GITHUB_OAUTH_CLIENT_SECRET Github oauth client secret

  • GITHUB_OAUTH_CLIENT_ID Github oauth client id

  • DISCORD_OAUTH_CLIENT_SECRET The client secret for discord oauth

  • DISCORD_OAUTH_CLIENT_ID The client id for discord oauth

  • DISCORD_OAUTH_REDIRECT_URI The redirect uri for discord oauth

Bot Integration

  • DISCORD_BOT_TOKEN Your discord bot token

  • SLACK_BOT_TOKEN Your slack bot token

  • SLACK_SIGNING_SECRET Your slack signing secret

Frontend variables

Create a .env.local file in /packages/frontend with the following variables:

  • NEXT_PUBLIC_BACKEND_API The backend api url (Port included if applicable)
  • NEXT_PUBLIC_GITHUB_OAUTH_CLIENT_ID GITHUB OAUTH CLIENT ID
  • NEXT_PUBLIC_DISCORD_OAUTH_CLIENT_ID DISCORD OAUTH CLIENT ID
  • NEXT_PUBLIC_DISCORD_OAUTH_URL DISCORD OAUTH URL

How to run the app

Install dependencies

npm install

Prisma schema migration

npm run prisma:migrate

Prisma generate client

npm run prisma:generate

Build shared types

npm run shared:build

Start backend server in development mode

npm run start:backend:dev

Start frontend server in development mode

npm run start:frontend:dev

Validating Dockerfile locally

Build the image locally

docker build -t cogniverse-frontend . -f frontend.Dockerfile
docker build -t cogniverse-backend . -f backend.Dockerfile

cogniverse's People

Contributors

amellouki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

deemeetree

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.