GithubHelp home page GithubHelp logo

h-h-e / unpete Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jorge-menjivar/unsaged

0.0 0.0 0.0 1.74 MB

Open source chat kit engineered for seamless interaction with AI models.

Home Page: https://unsaged.com

License: Apache License 2.0

JavaScript 1.78% TypeScript 95.07% CSS 0.18% PLpgSQL 2.75% Dockerfile 0.22%

unpete's Introduction

poiesisPete logo

Join our Discord

Screenshot-1

Screenshot-2

Screenshot-3

Screenshot-4

Screenshot-5

๐ŸŽ‰ Welcome to poiesisPete

poiesisPete is a cutting-edge chat kit engineered for seamless interaction with AI models. It allows you to easily have conversations with different AI models from a variety of providers, all in one place. It also allows you to manage multiple users and conversations, and synchronize them across different devices. Leveraging the power of Next.js and Supabase, it offers a user-friendly and robust interface for engaging with AI models from a variety of providers.

๐ŸŒŸ Key Features

  • Multi-Model Support: Switch between different AI models from a variety of providers with ease.
  • Multi-User Support: Easily switch between users and manage their respective conversations.
  • Cloud Sync: Synchronize your conversations across different devices seamlessly with Supabase.
  • System Prompts: Personalize your conversation context and the AI's personality with system prompts.
  • Message Templates: Speed up message generation with support for variable templates.

๐Ÿค– Supported AI Models

๐Ÿšง Getting Started with poiesisPete

Step 1. Clone the Repository

git clone https://github.com/jorge-menjivar/poiesisPete.git

Step 2. Generate Supabase Tables

Run the Generation Script in the Supabase SQL editor.

This will do the following:

  • Create the tables required by poiesisPete.
  • Create the authentication schema and tables required by NextAuth.js.
  • Enable Row Level Security for the tables required by poiesisPete.
  • Apply the Row Level Security policies required by poiesisPete.

Step 3. Expose the next_auth schema

Expose the next_auth schema in the API settings by adding next_auth to the "Exposed schemas" list.

More information here.

Step 4. Create your auth secret

Create your secret with the following command:

openssl rand -base64 32

copy the output and save it for the next step.

Step 5. Create a .env.local file

Create a .env.local file and set the following variable:

NEXTAUTH_SECRET=your_secret_from_step_4

Step 6. Install Dependencies

npm i

Step 7. Run App

Run Locally:

npm run dev

Or run with Docker:

docker build -t poiesisPete . --rm
docker run --env-file=.env.local -p 3000:3000 --name poiesisPete poiesisPete

(Optional) Step 8. Provide API Keys in .env.local

To give everyone using your instance of poiesisPete access to any API key, create a .env.local file and set the appropriate environment variables. If you do not provide an API key in the env file, users will have to provide their own key.

โš™๏ธ Configuration

When deploying the application, the following environment variables can be set:

Env Variables

Required Environment Variable Default value Description
No NEXT_PUBLIC_DEBUG_MODE false Enables debug mode, which prints env variables to the terminal and console. Useful when debugging docker.
No OPENAI_API_KEY The default API key used for authenticating with OpenAI. Get Key
No OPENAI_API_URL https://api.openai.com/v1 The base url, for Azure use https://<endpoint>.openai.azure.com
No OPENAI_API_TYPE openai The API type, options are openai or azure
No OPENAI_API_VERSION 2023-03-15-preview Only applicable for Azure OpenAI
No OPENAI_ORGANIZATION Your OpenAI organization ID
No AZURE_DEPLOYMENT_ID Only applicable for Azure OpenAI
No ANTHROPIC_API_URL https://api.anthropic.com/v1 The base url for the Anthropic API. Get Key
No ANTHROPIC_API_KEY The default API key used for authenticating with Anthropic. See Versioning
No ANTHROPIC_API_VERSION 2023-06-01 The version of the Anthropic API
No PALM_API_URL https://generativelanguage.googleapis.com/v1beta2 The base url for the PALM 2 API from Google
No PALM_API_KEY The default API key used for authenticating with PaLM 2. Get Key
No NEXT_PUBLIC_DEFAULT_OPENAI_SYSTEM_PROMPT Defined in constants file The default system prompt to use on new conversations for OpenAI models.
No NEXT_PUBLIC_DEFAULT_ANTHROPIC_SYSTEM_PROMPT Defined in constants file The default system prompt to use on new conversations for Anthropic models.
No NEXT_PUBLIC_DEFAULT_PALM_SYSTEM_PROMPT Defined in constants file The default system prompt to use on new conversations for PaLM 2 models.
No NEXT_PUBLIC_DEFAULT_MODEL gpt-3.5-turbo The default model to use on new conversations
Yes NEXT_PUBLIC_SUPABASE_URL The project URL.
Yes NEXT_PUBLIC_SUPABASE_ANON_KEY The supabase project anon key.
Yes SUPABASE_SERVICE_ROLE_KEY The supabase project service role key.
Yes SUPABASE_JWT_SECRET Warning! Generating a new JWT Secret may invalidate other supabase tokens.
No NEXTAUTH_EMAIL_PATTERN The email regex pattern granted access to poiesisPete. For example [email protected]
Yes NEXTAUTH_SECRET NextAuth Settings. See Documentation
In prod. NEXTAUTH_URL http://localhost:3000 NextAuth Settings. See Documentation
In docker NEXTAUTH_URL_INTERNAL NextAuth Settings. See Documentation.
Yes <PROVIDER>_CLIENT_ID Provider OAuth Client ID
Yes <PROVIDER>_CLIENT_SECRET Provider OAuth Client Secret
Maybe <PROVIDER>_ISSUER Provider Issuer URL (Only some providers need this)

Where <PROVIDER> is one of the following:

  • APPLE
  • AUTH0
  • COGNITO
  • DISCORD
  • FACEBOOK
  • GITHUB
  • GITLAB
  • GOOGLE
  • OKTA
  • REDDIT
  • SALESFORCE
  • SLACK
  • SPOTIFY
  • TWITCH
  • TWITTER

For example, to enable Google and Github authentication, you would add the following to your .env.local file:

GITHUB_CLIENT_ID=xxxxxxxxxxxxx
GITHUB_CLIENT_SECRET=xxxxxxxxxxxxx
GOOGLE_CLIENT_ID=xxxxxxxxxxxxx
GOOGLE_CLIENT_SECRET=xxxxxxxxxxxx

For Auth0, you would add the following:

AUTH0_CLIENT_ID=xxxxxxxxxxxxx
AUTH0_CLIENT_SECRET=xxxxxxxxxxxxx
AUTH0_ISSUER=https://mydomain.us.auth0.com

๐Ÿ“ License

poiesisPete is licensed under the Apache 2.0 License. For more information, please refer to the LICENSE file in the repository.

๐Ÿค How to Contribute

We welcome contributions to the poiesisPete project! If you're interested in contributing, please take a look at our CONTRIBUTING.md file for guidelines and details on the process.

๐Ÿ“š Built With

poiesisPete was built using the following technologies:

  • Next.js: A React framework for production - it makes building static and dynamic React apps a breeze.
  • Supabase: An open-source Firebase alternative. We use it for its awesome database and authentication capabilities.
  • Chatbot UI: A customizable and easy-to-use chat UI for web applications.

We are grateful to the developers and communities behind these projects for their work that helped make poiesisPete possible.

unpete's People

Contributors

jorge-menjivar avatar h-h-e avatar skydiver avatar

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.