fpExportForAI()
Creates an HTML representation of the input file, optimized for providing semantic context with minimal tokens, rather than for styling the output for a Web browser. This option might be particularly useful if you want to provide the output to AI, providing more context than the plain text filter output, but less style content that is not relevant to the AI.
For more information, see Export For AI.
To use this function, you must copy the binaries provided in the InstallDir/Platform/html directory into the bin directory. By default, these binaries are omitted to reduce the size of the bin directory if you do not use this function.
Syntax
KVErrorCode(pascal* fpExportForAI)(
KVDocument pDocument,
const char* szOutputFile);
Arguments
pDocument
|
A |
szOutputFile
|
A pointer to a string that contains the path of the output file. On Windows, the path must be encoded in the local Windows code page. |
Returns
- If the call is successful, the return value is
KVError_Success. - If the call is unsuccessful, the return value is an error code that indicates the problem.
Discussion
-
This method might create a number of auxiliary files (other HTML files, images, or subdirectories) in the same folder as the output file.
-
This feature requires a license for Export for AI.
-
This feature respects the user-set config options
KVFLT_SETTEMPDIRECTORYandKVFLT_SETSRCPASSWORDbut otherwise configures the export process to provide the best output. -
This feature is available only on Windows x86, Windows x86 64, and Linux x86 64 platforms.