Skip to content

kazuma512/chatgpt-fastAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

chatgpt-fastAPI

Introduction

This is a simple API project that calls the ChatGPT API using FastAPI.

Installation

pip install -r requirements.txt

Usage

async def ask_gpt(input_text):
    completion = await client.chat.completions.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": input_text}])
    return completion.choices[0].message.content

About

This is a simple API project that calls the ChatGPT API using FastAPI.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages