https://github.com/samzhangjy/observerx
🤖️ Node.js framework for instantly building GPT bot applications.
https://github.com/samzhangjy/observerx
bot bot-framework chatgpt framework gpt gpt-3 gpt-4 gpt-api javascript nodejs typescript
Last synced: 4 months ago
JSON representation
🤖️ Node.js framework for instantly building GPT bot applications.
- Host: GitHub
- URL: https://github.com/samzhangjy/observerx
- Owner: samzhangjy
- License: mit
- Created: 2023-07-11T07:33:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-30T08:28:10.000Z (almost 2 years ago)
- Last Synced: 2023-08-30T14:37:45.851Z (almost 2 years ago)
- Topics: bot, bot-framework, chatgpt, framework, gpt, gpt-3, gpt-4, gpt-api, javascript, nodejs, typescript
- Language: TypeScript
- Homepage: https://observerx.samzhangjy.com
- Size: 16.9 MB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
Table of Contents
## About The Project
ObserverX is a bot framework bundled with various builtin features, including:
- Dynamic database loading
- Instant history search for bot
- Ready-to-deploy admin panel
- Multiple deployable platforms
- Fully customizableObserverX is currently built on top of GPT-3.5 / GPT-4's `function` API and may support other
bots in the future.## Getting Started
Follow the steps below to start a console session with the bot.
### Prerequisites
- Node.js 18.17.1 or higher
### Installation
1. Get an OpenAI API key at .
2. Install ObserverX
```sh
npm install @observerx/core @observerx/console @observerx/database @observerx/plugin-default
```
3. Create `index.js` and fill in the following content:
```js
import PlatformConsole from '@observerx/console';
import { addEntities, getDataSource } from '@observerx/database';
import ObserverX from '@observerx/core';
import pluginDefault from '@observerx/plugin-default';addEntities(...ObserverX.getDatabaseEntities());
const dataSource = getDataSource();
await dataSource.initialize();const platform = new PlatformConsole(dataSource);
platform.start({
model: 'GPT-3.5',
parentId: 'CONSOLE',
prompt: 'default',
plugins: [pluginDefault],
});
```
4. Create `.env` in the same folder as `index.js` and fill in the following content:
```properties
OPENAI_API_KEY=
OPENAI_BASE_PATH=
DATABASE_HOST=
DATABASE_USERNAME=
DATABASE_PASSWORD=
DATABASE_NAME=
DATABASE_PORT=
```
Note that you **must** use Postgres as the database.
5. Run `index.js`:
```sh
node index.js
```
...and you're ready to go!## Roadmap
See the [open issues](https://github.com/samzhangjy/ObserverX/issues) for a full list of proposed features (and known issues).
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
You can contribute to ObserverX by [opening an issue](https://github.com/samzhangjy/ObserverX/issues) or [starting a pull request](https://github.com/samzhangjy/ObserverX/pulls)
## License
Distributed under the MIT License. See `LICENSE` for more information.
[contributors-shield]: https://img.shields.io/github/contributors/samzhangjy/ObserverX.svg?style=for-the-badge
[contributors-url]: https://github.com/samzhangjy/ObserverX/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/samzhangjy/ObserverX.svg?style=for-the-badge
[forks-url]: https://github.com/samzhangjy/ObserverX/network/members
[stars-shield]: https://img.shields.io/github/stars/samzhangjy/ObserverX.svg?style=for-the-badge
[stars-url]: https://github.com/samzhangjy/ObserverX/stargazers
[issues-shield]: https://img.shields.io/github/issues/samzhangjy/ObserverX.svg?style=for-the-badge
[issues-url]: https://github.com/samzhangjy/ObserverX/issues
[license-shield]: https://img.shields.io/github/license/samzhangjy/ObserverX.svg?style=for-the-badge
[license-url]: https://github.com/samzhangjy/ObserverX/blob/main/LICENSE