Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Latest commit

 

History

History
31 lines (22 loc) · 819 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 819 Bytes

LuaOpenAI

broken after critical api change

local OpenAI = loadstring(game:HttpGet('https://raw.githubusercontent.com/Perthys/LuaOpenAI/main/main.lua'))()
local Dump = loadstring(game:HttpGet('https://raw.githubusercontent.com/Perthys/table/main/main.lua'))().Dump

local Configuration, API = OpenAI.Configuration, OpenAI.OpenAIAPI

local Config = Configuration.new({
    APIKey = "sk-__________________________________________";
})

local OpenAIInstance = API.new(Config);

local Response = OpenAIInstance:CreateCompletion({
    ["model"] = "text-davinci-003",
    ["prompt"] = "hello",
    ["temperature"] = 0.8,
    ["max_tokens"] = 40,
    ["top_p"] = 1,
    ["frequency_penalty"] = 0,
    ["presence_penalty"] = 0
});

print(Dump(Response))

Most if not all endpoints are inside of the api