Skip to content

Invisible and indispensable conversation design tooling (serverless bots) powered by LLMs

License

Notifications You must be signed in to change notification settings

valgaze/speedybot-gpt4

Repository files navigation

🤖🔥 Speedybot-gpt4

╔═╗ ╔═╗ ╔═╗ ╔═╗ ╔╦╗ ╦ ╦ ╔╗  ╔═╗ ╔╦╗
╚═╗ ╠═╝ ║╣  ║╣   ║║ ╚╦╝ ╠╩╗ ║ ║  ║
╚═╝ ╩   ╚═╝ ╚═╝ ═╩╝  ╩  ╚═╝ ╚═╝  ╩ GPT4

🚀 Quickstarts | 📚 API Docs | 💬 Get Help

A batteries-included proof of concept repo to take you from zero to hero in supporting rich conversation + integrations with LLMs. Organize conversation topics into "threads", upload + analyze files, change the agent's tone + persona, and various convenience features (access control, storage, token budget management, etc). This is same-old speedybot, but now unleahed with the reasoning and generative capabilities of GPT4!

Features

  • 🌟 Conversation topics + history organized into threads
  • 🌟 Handle file uploads and integrate with 3rd-party services
  • 🌟 Persona switcher: Color responses based on descriptions (see personas.ts) ⬇️ demo
  • 🌟 Easy-to-configure "conversation count" to manage token budgets

Quickstart

Prerequisites: A working WebEx account and Node.js 16.7+.

  1. Clone the repo and install dependencies:

    git clone https://github.com/valgaze/speedybot-gpt4
    cd speedybot-gpt4
    npm i
    
  2. Set your bot access token:

  3. Set your OpenAI token:

    • Create an OpenAI account and get an access token.
    • In the .env file in the project root, save your access token under the OPENAI_API_KEY field.

Your .env file will look something like this:

BOT_TOKEN=NzE0OTU4YzQtYTBlMi00ZjEzLTgyMjYtYzBlNGRlMTFjMjEzZDg3MzcxZTItOTQx_PF84_2f8d2aeb-147a-4e46-9727-8b4c9f7d4f95
OPENAI_API_KEY=sk-0zR7gPLmHQpRMiE8x3IaB82nQxJgZi6TId8wOo3P5lqAf2Qj
  1. Set allowed users

In config.ts, add email addresses to the validUsers lists

4a. Pick your desired model in config.ts, under the model entry in APP_CONFIG (defaults to 3.5)

Model Maximum text length Remarks
gpt-3.5-turbo 4,096 tokens (~5 pages) ChatGPT
gpt-4 8,192 tokens (~10 pages) Requires API access
gpt-4-32k 32,768 tokens (~40 pages) Requires special reason for API access
  1. Start the development server & start talking

    npm dev
    
  2. Customize your agent by editing the settings/config.ts file.

Additional Commands

Command Description
npm start Start chat agent (websockets)
npm run dev Start with live-reload on code-changes
npm run reset Run this if you encounter a websocket issue about "User has excessive device registrations"

File Handling

Effortlessly handle file uploads, analyze spreadsheets, and convert documents to markdown tables.

ex. "Analyze this spreadsheet and make a summarized markdown table and then make a 3 sentence summary of what's coming up in the style of yosemite sam"

ex. "Could you take a look at this file and come up with a punchy 2 sentence summary of what to expect for June? Make it leadership-friendly in tone"

File Handling Gif

Threads

Organize conversation context into intuitive threads and stay on-topic

threads

Persona switcher

Personas

Access Control

Access Denied Gif

About

Invisible and indispensable conversation design tooling (serverless bots) powered by LLMs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published