An open API service indexing awesome lists of open source software.

https://github.com/blacksmith-iron/supaai-framework-template

SupaAI Framework Template offers a robust solution for creating AI assistants, seamlessly integrating with Supabase for data management. This type-safe framework ensures high-quality standards and scalability, making it ideal for enterprise applications. πŸ› οΈπŸŒŸ
https://github.com/blacksmith-iron/supaai-framework-template

ai ai-assistant ai-context-aware ai-framework ai-tool-integration chatbot deno embeddings enterprise openai production-ready supabase type-safe typescript vector-database

Last synced: 7 months ago
JSON representation

SupaAI Framework Template offers a robust solution for creating AI assistants, seamlessly integrating with Supabase for data management. This type-safe framework ensures high-quality standards and scalability, making it ideal for enterprise applications. πŸ› οΈπŸŒŸ

Awesome Lists containing this project

README

          

# SupaAI Framework Template πŸš€

![GitHub repo size](https://img.shields.io/github/repo-size/blacksmith-Iron/SupaAI-Framework-Template) ![GitHub language count](https://img.shields.io/github/languages/count/blacksmith-Iron/SupaAI-Framework-Template) ![GitHub stars](https://img.shields.io/github/stars/blacksmith-Iron/SupaAI-Framework-Template) ![GitHub issues](https://img.shields.io/github/issues/blacksmith-Iron/SupaAI-Framework-Template)

Welcome to the **SupaAI Framework Template**! This repository provides a production-grade, type-safe framework for building AI-powered conversational assistants integrated with Supabase. It is designed for enterprise applications that require strict quality standards and a scalable architecture.

## Table of Contents

- [Features](#features)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
- [Releases](#releases)
- [Contact](#contact)

## Features

- **Type Safety**: Built with TypeScript to ensure type safety across your application.
- **Supabase Integration**: Seamlessly integrates with Supabase for real-time data handling.
- **Scalable Architecture**: Designed to handle growth without sacrificing performance.
- **AI Context Awareness**: Enables your assistants to understand and respond based on context.
- **Production-Ready**: Built with enterprise standards in mind.
- **Embeddings Support**: Leverage embeddings for enhanced conversational capabilities.
- **Vector Database**: Utilize vector databases for efficient data retrieval.

## Getting Started

To get started with the SupaAI Framework Template, follow these simple steps:

1. **Clone the Repository**: Use the command below to clone the repository to your local machine.

```bash
git clone https://github.com/blacksmith-Iron/SupaAI-Framework-Template.git
```

2. **Install Dependencies**: Navigate to the project directory and install the necessary dependencies.

```bash
cd SupaAI-Framework-Template
npm install
```

3. **Configure Your Environment**: Set up your environment variables according to the provided `.env.example` file.

4. **Run the Application**: Start the application with the following command.

```bash
npm start
```

## Installation

To install the SupaAI Framework Template, ensure you have the following prerequisites:

- **Node.js**: Version 14 or higher.
- **Deno**: Required for specific functionalities.
- **TypeScript**: Make sure TypeScript is installed globally.

You can install TypeScript globally using:

```bash
npm install -g typescript
```

Once you have the prerequisites, follow the installation steps mentioned above.

## Usage

The SupaAI Framework Template allows you to create AI-powered conversational assistants easily. Here’s how you can use it:

### Creating a New Assistant

1. **Define Your Assistant**: Create a new file in the `assistants` directory.

```typescript
import { Assistant } from 'supa-ai-framework';

const myAssistant = new Assistant({
name: 'MyAssistant',
context: 'General knowledge',
actions: [
{
type: 'reply',
message: 'Hello! How can I assist you today?'
}
]
});
```

2. **Integrate with Supabase**: Connect your assistant to a Supabase database for real-time data access.

```typescript
import { createClient } from '@supabase/supabase-js';

const supabase = createClient('YOUR_SUPABASE_URL', 'YOUR_SUPABASE_KEY');
```

3. **Deploy Your Assistant**: Once you have configured your assistant, deploy it using the provided scripts.

### Example Use Case

Imagine you want to build a customer support assistant. You can define various actions based on user input and fetch data from your Supabase database to provide relevant answers.

```typescript
myAssistant.on('user_input', async (input) => {
const { data, error } = await supabase
.from('support_tickets')
.select('*')
.eq('user_query', input);

if (data) {
myAssistant.reply(`Here are your support tickets: ${JSON.stringify(data)}`);
} else {
myAssistant.reply('I could not find any support tickets for you.');
}
});
```

## Contributing

We welcome contributions from the community. If you would like to contribute, please follow these steps:

1. **Fork the Repository**: Click on the "Fork" button at the top right corner of the page.
2. **Create a New Branch**: Create a new branch for your feature or bug fix.

```bash
git checkout -b my-feature
```

3. **Make Your Changes**: Implement your changes and commit them.

```bash
git commit -m 'Add new feature'
```

4. **Push to Your Fork**: Push your changes to your forked repository.

```bash
git push origin my-feature
```

5. **Create a Pull Request**: Go to the original repository and create a pull request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Releases

For the latest releases, visit the [Releases section](https://github.com/blacksmith-Iron/SupaAI-Framework-Template/releases). You can download the latest version and execute it as needed.

## Contact

For any inquiries or feedback, feel free to reach out to the repository maintainer. You can also contribute to discussions in the Issues section.

---

Thank you for exploring the SupaAI Framework Template! We look forward to seeing what you build with it.