Unreal OpenAI API 1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
UChatGPT Class Reference
Inheritance diagram for UChatGPT:

Public Member Functions

void SetAuth (const FOpenAIAuth &OpenAIAuth)
 
void SetModel (const FString &Model)
 
FString GetModel () const
 
void SetMaxTokens (int32 Tokens)
 
void SetLogEnabled (bool Enabled)
 
bool RegisterService (const TSubclassOf< UBaseService > &ServiceClass, const OpenAI::ServiceSecrets &Secrets)
 
void UnRegisterService (const TSubclassOf< UBaseService > &ServiceClass)
 
void AddMessage (const FMessage &Message)
 
void SetAssistantMessage (const FMessage &Message)
 
FMessage GetAssistantMessage () const
 
void MakeRequest ()
 
void ClearHistory ()
 
TArray< FMessageGetHistory () const
 
FOnChatGPTRequestCompleted & OnRequestCompleted ()
 
FOnChatGPTRequestUpdated & OnRequestUpdated ()
 

Private Member Functions

void HandleRequestCompletion ()
 
void UpdateAssistantMessage (const FString &Message, bool WasError=false)
 
void HandleError (const FString &Content)
 
bool HandleFunctionCall (const FFunctionCommon &FunctionCall, const FString &ID)
 

Private Attributes

TObjectPtr< UOpenAIProviderProvider
 
TArray< TObjectPtr< UBaseService > > Services
 
FOpenAIAuth Auth
 
FString OpenAIModel
 
int32 MaxCompletionTokens {100}
 
TArray< FMessageChatHistory
 
FMessage AssistantMessage
 
FOnChatGPTRequestCompleted RequestCompleted
 
FOnChatGPTRequestUpdated RequestUpdated
 

The documentation for this class was generated from the following files: