╔═╗ ╔═╗ ╔═╗ ╔═╗ ╔╦╗ ╦ ╦ ╔╗ ╔═╗ ╔╦╗
╚═╗ ╠═╝ ║╣ ║╣ ║║ ╚╦╝ ╠╩╗ ║ ║ ║
╚═╝ ╩ ╚═╝ ╚═╝ ═╩╝ ╩ ╚═╝ ╚═╝ ╩ 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!
- 🌟 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
Prerequisites: A working WebEx account and Node.js 16.7+.
-
Clone the repo and install dependencies:
git clone https://github.com/valgaze/speedybot-gpt4 cd speedybot-gpt4 npm i
-
Set your bot access token:
- Obtain an existing bot token from https://developer.webex.com/my-apps or create a new bot and save the token from https://developer.webex.com/my-apps/new/bot.
- Copy the file .env.example as
.env
in the project root and save your access token under theBOT_TOKEN
field.
-
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 theOPENAI_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
- 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 |
-
Start the development server & start talking
npm dev
-
Customize your agent by editing the settings/config.ts file.
-
Support more file-types, see the file adapters
-
To edit personas, see here
-
Check the 📚 API Docs for further details
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" |
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"
Organize conversation context into intuitive threads and stay on-topic