/ailoomhub-cli

Command Line Interface (CLI) tool designed for utilizing Notion as your knowledge base, with the capability to leverage OpenAI models for generating and enhancing information.

Primary LanguagePHP

AILoomHub CLI

Command Line Interface (CLI) tool designed for utilizing Notion as your knowledge base, with the capability to leverage OpenAI models for generating and enhancing information.

Installation

Cloning the Repository

Clone the repository to your local environment:

git clone https://github.com/199ocero/ailoomhub-cli.git
cd ailoomhub-cli

Ensure you have Composer installed. If not, get it here.

Run the following command in the project directory:

composer install

PostgreSQL Setup

To get started, make sure you have PostgreSQL v14 installed on your system. If you don't have it installed yet, you can download it here.

Creating a Database

Once PostgreSQL is installed, create a database for your project by following these steps:

  1. Open your PostgreSQL environment.
  2. Use the appropriate commands to create a new database.

Installing pgvector Extension

To enable vector similarity search in your PostgreSQL database, you'll need to install the pgvector extension. Follow these instructions:

  1. Refer to the official documentation for the pgvector extension.
  2. Follow the provided instructions to install the extension in your PostgreSQL environment.

After completing these steps, your PostgreSQL setup should be ready for use with the pgvector extension.

Setup

OpenAI API Key

Before starting, ensure you have set your OpenAI Secret Key in the .env file:

OPENAI_API_KEY=sk-tzY...

Prompt Steps

  1. Create User: To create a user, run:

    php artisan make:user
  2. Notion Integration: Create a Notion integration using the command:

    php artisan make:notion

    Note: Create an internal Notion integration here.

  3. Embed Collection: Generate an embed collection by running:

    php artisan make:embed-collection
  4. Retrieve Connected Pages: Use the command to fetch all connected pages:

    php artisan make:page-retriever

    Note: If no pages are connected, follow the steps here to establish connections.

  5. Create Text Embedding: Generate text embedding with:

    php artisan make:embedding
  6. Ask a Chatbot: You can now test if your chatbot is working:

    php artisan ask:chatbot