An API that shortens a sentence as short as possible using Local AI.
- Install dependencies:
npm install-
Make an account on picovoice.ai and grab your access key
-
On the same site download an LLM from the picoLLM page, and drop it in to the llm folder.
-
Change the access key in the .env file
-
Start the server:
npm startEndpoint: POST /unyapify
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/unyapifyOutput
{"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