<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command > AI - History > Get History Text |
MiniRobotLanguage (MRL)
AIC.Get History Text
Get the complete stored AI-History as one Text.
Intention
The AIC.Get History command enables users to retrieve the full record of the most recent question and its corresponding answers exchanged with any AI model. This includes all text-based inputs and outputs sent to and received from the AI.
Please note that outputs from "Generate Image" models, which provide images in Base64 encoded format, are not included in the history. This is due to the substantial data size of these images, which could make the history difficult to read.
The AIC.Get History command is versatile and can be used with any AI model, regardless of whether it operates locally or online. The history integrates the text-based interactions from all AI models, creating a comprehensive record of text inputs and outputs across different models.
AIC.Get History Text|<Variable for Return>
AIC.Get History|$$RET
MBX.$$RET
This example Recalls the last Prompt send to any AI-Model..
AIL.Set Number|1
AIL.Set Temperature|$$LR0
AIL.Set Model|Hermes
$$TXT=Hello! Please tell me what 3+4 is.
AIL.Ask GPT4All|$$TXT|$$REA
$$TXT=Hello! Please tell me what 5+6 is.
AIL.Ask GPT4All|$$TXT|$$REA
DBP.-------------
AIC.ght|$$REB
DBP.The complete history was:
DBP.$$REB
DBP.-------------
ENR.
Debug Window
[10:06:12] -------------
[10:06:12] The complete history was:
[10:06:12]
<AI-Count: 1 at: 08.07.2023.10:06:07>
Hello! Please tell me what 3+4 is.
The result of the addition of 3 and 4 is 7.
<AI-Count: 2 at: 08.07.2023.10:06:12>
Hello! Please tell me what 5+6 is.
The result of 5 + 6 is 11.
[10:06:12] -------------
Syntax
AIC.Get History[|P1]
AIC.GHI[|P1]
Parameter Explanation
P1 - opt. Variable for the result. If omitted TOS i used.
Example
'*****************************************************
' EXAMPLE 1: AIC.-Commands
'*****************************************************
VAN.$$TIM=#dtime#
AIL.SetModel|$$MOD
AIL.Set MaxToken|1024
AIC.Set Number|1
FOR.$$LR0|0|1|0.1
AIL.Set Temperature|$$LR0
AIL.Set Model|Hermes
$$TXT=Hello! I have a list of items represented as a string, and I would like your assistance in sorting these items alphabetically. The items in the list are separated by periods. Here is the list:
$$TXT=$$TXT "ISP.NSP.WSP.GSP.SSP."
$$TXT=$$TXT Please follow these steps to sort the items:
$$TXT=$$TXT Split the string into individual items based on the period ('.') delimiter.
$$TXT=$$TXT Sort the resulting array of items in alphabetical order.
$$TXT=$$TXT Join the sorted items back into a single string, using the period ('.') as the delimiter.
$$TXT=$$TXT Please provide me with the sorted string as the output. DO not generate Python code. Thank you!
AIC.Estimate Token Count|$$TXT|$$TOA
AIL.Ask GPT4All|$$TXT|$$REA
CAL.$$TIU=#dsince#|i
AIC.Estimate Token Count|$$REA|$$TOB
DBP.-------------
VAR.$$OUT=$$REA $crlf$Temp. $$LR0 $crlf$ Time used: $$TIU sec.$crlf$Tokens in Prompt: $$TOA$crlf$Tokens in Anwer: $$TOB
DBP.$$OUT
DBP.-------------
AIC.ghi|$$REB
DBP.The complete history was:
DBP.$$REB
NEX.
ENR.
Remarks
-
Limitations:
Currently the history has a hard-cap of the last 200 kb.This is not a limitation but just to prevent it from memory overflow.
See also:
• Set_Key
• Ask_Chat