Skip to content

tanosshi/unyapify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unyapify

An API that shortens a sentence as short as possible using Local AI.

Setup

  1. Install dependencies:
npm install
  1. Make an account on picovoice.ai and grab your access key

  2. On the same site download an LLM from the picoLLM page, and drop it in to the llm folder.

  3. Change the access key in the .env file

  4. Start the server:

npm start

API Usage

Shorten a text

Endpoint: POST /unyapify

Example using powershell

Invoke-WebRequest -Method POST `
   -Headers @{"Content-Type"="application/json"} `
   -Body '{"text":"I love cats with all my heart I wouldnt know what to do without them"}' `
   -Uri http://localhost:3000/unyapify

Output {"text":"I love cats, they're my heart's desire"}

  • Tested using llama-3.2-1b-instruct-430.pllm

Error Response (400 Bad Request):

{
    "error": "No text provided"
}

! this is just a quick demo i do not plan on hosting this