OSL ‐ GPT - Mistium/Origin-OS GitHub Wiki
New docs (using method syntax)
Creating a new chat
name = gptNew()
Resetting a chat
name.gptReset()
Bot Setup
name.gptInform(data)
Example:
programmer = gptNew()
programmer.gptInform("You are a master programmer")
log programmer.gptSend("how do I print text in python?")
Deleting a bot and it's chats
name.gptRemove()
Sending a prompt to a bot
log name.gptSend(data)
Example:
test_bot = gptNew()
// create bot
say test_bot.gptSend("Hello! how are you?")
// Say the output from gpt
Generating images
gpt "generate_img" "prompt"
Choose a specific model
gpt "generate_img" "prompt" "OpenJourney"
gpt "generate_img" "prompt" "Dreamshaper"
gpt "generate_img" "prompt" "Anything"
gpt "generate_img" "prompt" "Realistic"
Example:
my_image = ""
// setup the variables
mainloop:
// makes sure to run this every frame
if my_image == "" (
gpt "generate_img" "A penguin on the moon"
// Send to bot
my_image = data
// save the image url to a variable
)
image my_image 100
// draw the image
import "win-buttons"
// imports the window buttons
Generate text with no context and no bots
say "hello, how are you?".gptGenerate()
// generates the text and says it
Get chat history
history = name.gptHistory()
// grab the history of chats with a bot as a json array
// sets the history variable to a json array of your chats with a specific bot
old docs (using command syntax instead of methods)
Creating a new chat
gpt "new_bot" "name"
Resetting a chat
gpt "reset" "name"
Bot Setup
gpt "inform_bot" "name" "data"
Example:
gpt "inform_bot" "name" "You are a master programmer"
Deleting a bot and it's chats
gpt "delete_bot" "name"
Sending a prompt to a bot
gpt "send" "prompt" "name"
Example:
got "new_bot" "test_bot"
// create bot
gpt "send" "test_bot" "Hello! how are you?"
// Send to bot
say data
// show the output to the user
Generating images
gpt "generate_img" "prompt"
Choose a specific model
gpt "generate_img" "prompt" "OpenJourney"
gpt "generate_img" "prompt" "Dreamshaper"
gpt "generate_img" "prompt" "Anything"
gpt "generate_img" "prompt" "Realistic"
Example:
my_image = ""
// setup the variables
mainloop:
// makes sure to run this every frame
if my_image == "" (
gpt "generate_img" "A penguin on the moon"
// Send to bot
my_image = data
// save the image url to a variable
)
image my_image 100
// draw the image
import "win-buttons"
// imports the window buttons
Generate text with no context and no bots
gpt "generate_text" "hello, how are you?"
// generates the text
say data
// outputs the text to the user
Get chat history
gpt "history" "bot_name"
// grab the history of chats with a bot as a json array
history = data
// sets the history variable to a json array of your chats with a specific bot