CallGeneralAI
Description
This function calls Rocket Networking's AI API (which is just a wrapper for OpenAI API) but works differently from CallSimpleAI
Here you need to pass a messagesArray similar to the way OpenAI takes its input. You have to make an array of structs where each struct represents a message, with a role("system", "user" or "assistant" ) and content.
Syntax
messagesArray
The message array you want to send to AI. This must be an array of Structs, with each struct having a "role" and "content"
temperature
Returns
This function returns the callId which is a unique identifier for this AI call. Later in callback_CallGeneralAI
, this is returned so you can track it.
Example Implementation
NPC
Let's say you have a dialogue based game. You can provide context to the AI and make it act like a character in your game. Providing proper context is crucial here!
Mental Health Assistant
the callback_CallGeneralAI() actually gives response from this function.
Last updated