From 1ab6447f5c85ce699b88ae1c9c6112de91b3dd16 Mon Sep 17 00:00:00 2001 From: marcelovicentegc Date: Sun, 17 Dec 2023 20:50:41 -0300 Subject: [PATCH] docs: update readme --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9ac3dec..20af471 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/eutiveumsonho/chiron/fork) +

Eu tive um sonho - Chiron

Chiron - Human-in-the-loop back-office service

@@ -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 @@ -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: @@ -47,7 +55,7 @@ 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 @@ -55,6 +63,32 @@ Before deploying this service, make sure you have access to a: 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) \ No newline at end of file +```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, + }) +``` \ No newline at end of file