Skip to content

borisnliscool/OpenAI-FiveM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI-FiveM

A simple wrapper for the OpenAI API.

Showcase: streamable.com/1bf31f

My Discord for limited support.

Setup

Add your OpenAI api key to your server configuration.

set openai_api_key "<key>";

Usage

local OpenAI = exports["OpenAI-FiveM"]

local data = OpenAI:Complete({
    engine = "text-davinci-003",
    prompt = "this is a test",
    maxTokens = 100,
    temperature = 0.9,
    topP = 1,
    presencePenalty = 0,
    frequencyPenalty = 0,
    bestOf = 1,
    n = 1,
    stream = false,
    stop = { "\n" }
})

print(json.encode(data, { indent = true }))

For more information I recommend checking out OpenAI's Website about this stuff.

Like it? Star it.

About

A simple wrapper for the OpenAI API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages