|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIG. - Google AI > 5. Configuration User, File & Clipboard > AIG. - AI Google Gemini Integration |
MiniRobotLanguage (MRL)
AIG.SetSaveToFile
Set File Path to Automatically Save Response Content
Intention
Configure the framework to automatically save the main content extracted from the AI's response (stored in AIG_GeminiContent) to a specified file after the response is analyzed. The content is saved as Unicode text.
This Command sets the AIG_SaveToFile global variable with the provided filename (and optional path).
If a non-empty path is provided, the HTP_AnalyzeGoogleResponse function will attempt to save the AIG_GeminiContent to that file.
If you provide an empty string ("") or omit the parameter, the automatic saving feature is disabled (default).
Use this Command to:
�Log Responses: Automatically keep a record of AI outputs for later review or analysis.
�Preserve Unicode: Save the response as a Unicode text file, minimizing potential character loss compared to copying/pasting.
�Automation: Easily integrate response saving into automated scripts without manual intervention.
Provide the desired filename, including the full path if necessary, as parameter P1. Use an empty string to disable saving.
Example Usage
// Enable saving to a specific file
AIG.SetSaveToFile|C:\Temp\Gemini_Log.txt
DBP. Response will be saved to C:\Temp\Gemini_Log.txt
// Subsequent AIG.Ask or AIG.AskVision calls will save their results
// ...
// Disable saving
AIG.SetSaveToFile|""
DBP. Automatic saving disabled.
Syntax
AIG.SetSaveToFile|P1
AIG.ssf|P1
Parameter Explanation
P1 - (Optional) A string containing the full path and filename where the response should be saved.
� �- If a non-empty path is provided, saving is enabled.
� �- If an empty string (`""`) is provided or the parameter is omitted, saving is disabled.
Remarks
- The file is overwritten each time a response is successfully analyzed and saved.
- Saving only occurs if the analysis is successful and the extracted content is not an error message.
- The file is saved using Unicode encoding (`CHR = WIDE`).
- Ensure the application has write permissions to the specified directory.
- Use AIG.GetSaveToFile to retrieve the currently configured path.
See also: