Skip to content

yagizhanNY/summary-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary API

This API for summarize input prompts with ChatGPT and returns a summarized text.

I developed this to test and have knowledge about FastAPI.

Clone

You have to set OPENAI_APIKEY env variable on your OS.

## Powershell

$Env:OPENAI_APIKEY = "{YOUR_API_KEY}"

## Linux, MacOS, Windows Bash

export OPENAI_APIKEY="{YOUR_API_KEY}"

Run

Install the modules.

pip install -r requirements.txt

Run the server with uvicorn.

uvicorn main:app --reload

Endpoints

about

GET:http://localhost:8000/about

returns

{
  "about": "This api is for summarizing an input prompt and returning short summarized text. It is using ChatGPT for the summarization."
}

summarize

POST:http://localhost:8000/summarize

body

{
  "text": "Some text"
}

returns

{
  "response": "summarized text"
}

Releases

No releases published

Packages

No packages published

Languages