Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelovicentegc committed Dec 17, 2023
1 parent 2c5cc87 commit 1ab6447
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/eutiveumsonho/chiron/fork)

<p align="center">
<img alt="Eu tive um sonho - Chiron" src="https://raw.githubusercontent.com/eutiveumsonho/.github/main/profile/assets/logo-512x512.png" height="192" width="192" />
<h3 align="center">Chiron - Human-in-the-loop back-office service</h3>
Expand All @@ -8,9 +10,15 @@

## What is this?

Chiron is a simple back-office service that allows you to create a human-in-the-loop system for your AI models. It's a simple service that offers a visual interface to review data generated by your AI model. It's simple API allows you to send generated data from your AI model to Chiron, and receive the reviewed data back to the specified callback URL.
Chiron was designed to be a simple service that enables you to create a human-in-the-loop system for your AI models (but you can use it for any other task that requires human input).

It offers:
- An API that allows you to send any JSON to Chiron, and receive the reviewed data back to a specified callback URL.
- A visual interface to review data, correct or adjust it, and add more data to it (such as labels).

Chiron is currently being used on the human review pipeline of AI generated data from [Eu tive um sonho](https://eutiveumsonho.com).

### Operation
### How does it work?

```mermaid
sequenceDiagram
Expand All @@ -23,7 +31,7 @@ sequenceDiagram
Chiron->>+App: Hits App back with reviewed data with a POST request to the callback URL
```

## Development
## How can I run this on my own machine?

Create a `.env.local` file based on the [`.env.example`](.env.example) file. You will need access to a SMTP server credentials, a MongoDB instance and to set up an encryption key to spin this service. You can generate a key using the following command:

Expand All @@ -47,14 +55,40 @@ bun dev

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Deployment
## How can I deploy this on my own server?

Before deploying this service, make sure you have access to a:
- SMTP server
- MongoDB instance

Take a look at the `.env.example` file to see which environment variables you need to set up the application.

This project is deployed using [Vercel](https://vercel.com/). You can deploy your own instance using the button below (feel free to deploy it anywhere else):
This project is deployed using [Vercel](https://vercel.com/). You can deploy your own instance using the button below (but feel free to deploy it anywhere else - this project doesn't rely on any Vercel-specific feature):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/eutiveumsonho/chiron)

### How can I use this service?

After deploying the service, you can access the API Management page by accessing the `/api-management` route. You will need to create a vendor to get your API keys. A vendor is a service that will be using Chiron to review data. You can create as many vendors as you want.

While creating a vendor, you will need to provide the following information:

| Field | Description |
| ------------ | --------------------------------------------------------- |
| Name | The name of your vendor. |
| Origin URL | The URL of your application. |
| Callback URL | The URL where Chiron will send the reviewed data back to. |

Once you've created a vendor, copy and paste its API keys and vendor ID to your application. You can now start sending data to Chiron. You can send data to Chiron by hitting the `/api/data/completions` route with a POST request. The data you send should be in the following format:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/eutiveumsonho/chiron)
```js
fetch("https://yourdomain.com/api/data/completions", {
method: "POST",
headers: {
vendorId, // The generated vendor ID here
apiKey, // The generated API key here
"Content-Type": "application/json",
},
body: JSON.stringify(data) // Your data here,
})
```

0 comments on commit 1ab6447

Please sign in to comment.