@chilkat/react-native 11.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/ChilkatRN.podspec +44 -0
- package/LICENSE +254 -0
- package/README.md +67 -0
- package/android/CMakeLists.txt +60 -0
- package/android/build.gradle +148 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +12 -0
- package/android/src/main/java/com/margelo/nitro/chilkat/ChilkatRNPackage.java +33 -0
- package/chilkat-checksums.json +9 -0
- package/cpp/HybridAi.cpp +660 -0
- package/cpp/HybridAi.hpp +159 -0
- package/cpp/HybridAsn.cpp +403 -0
- package/cpp/HybridAsn.hpp +105 -0
- package/cpp/HybridAuthAws.cpp +188 -0
- package/cpp/HybridAuthAws.hpp +55 -0
- package/cpp/HybridAuthAzureSAS.cpp +142 -0
- package/cpp/HybridAuthAzureSAS.hpp +47 -0
- package/cpp/HybridAuthAzureStorage.cpp +144 -0
- package/cpp/HybridAuthAzureStorage.hpp +47 -0
- package/cpp/HybridAuthGoogle.cpp +215 -0
- package/cpp/HybridAuthGoogle.hpp +67 -0
- package/cpp/HybridBinData.cpp +439 -0
- package/cpp/HybridBinData.hpp +112 -0
- package/cpp/HybridBz2.cpp +177 -0
- package/cpp/HybridBz2.hpp +58 -0
- package/cpp/HybridCache.cpp +314 -0
- package/cpp/HybridCache.hpp +82 -0
- package/cpp/HybridCert.cpp +840 -0
- package/cpp/HybridCert.hpp +196 -0
- package/cpp/HybridCertChain.cpp +149 -0
- package/cpp/HybridCertChain.hpp +50 -0
- package/cpp/HybridCertStore.cpp +276 -0
- package/cpp/HybridCertStore.hpp +78 -0
- package/cpp/HybridCharset.cpp +333 -0
- package/cpp/HybridCharset.hpp +83 -0
- package/cpp/HybridCkDateTime.cpp +384 -0
- package/cpp/HybridCkDateTime.hpp +105 -0
- package/cpp/HybridCodeSign.cpp +156 -0
- package/cpp/HybridCodeSign.hpp +55 -0
- package/cpp/HybridCompression.cpp +422 -0
- package/cpp/HybridCompression.hpp +100 -0
- package/cpp/HybridCrypt2.cpp +1517 -0
- package/cpp/HybridCrypt2.hpp +320 -0
- package/cpp/HybridCsr.cpp +292 -0
- package/cpp/HybridCsr.hpp +77 -0
- package/cpp/HybridCsv.cpp +382 -0
- package/cpp/HybridCsv.hpp +101 -0
- package/cpp/HybridDh.cpp +137 -0
- package/cpp/HybridDh.hpp +47 -0
- package/cpp/HybridDirTree.cpp +167 -0
- package/cpp/HybridDirTree.hpp +53 -0
- package/cpp/HybridDkim.cpp +249 -0
- package/cpp/HybridDkim.hpp +74 -0
- package/cpp/HybridDns.cpp +193 -0
- package/cpp/HybridDns.hpp +64 -0
- package/cpp/HybridDsa.cpp +453 -0
- package/cpp/HybridDsa.hpp +112 -0
- package/cpp/HybridDtObj.cpp +172 -0
- package/cpp/HybridDtObj.hpp +57 -0
- package/cpp/HybridEcc.cpp +195 -0
- package/cpp/HybridEcc.hpp +55 -0
- package/cpp/HybridEdDSA.cpp +147 -0
- package/cpp/HybridEdDSA.hpp +47 -0
- package/cpp/HybridEmail.cpp +1911 -0
- package/cpp/HybridEmail.hpp +419 -0
- package/cpp/HybridEmailBundle.cpp +204 -0
- package/cpp/HybridEmailBundle.hpp +64 -0
- package/cpp/HybridFileAccess.cpp +631 -0
- package/cpp/HybridFileAccess.hpp +149 -0
- package/cpp/HybridFtp2.cpp +2308 -0
- package/cpp/HybridFtp2.hpp +462 -0
- package/cpp/HybridGlobal.cpp +221 -0
- package/cpp/HybridGlobal.hpp +68 -0
- package/cpp/HybridGzip.cpp +440 -0
- package/cpp/HybridGzip.hpp +105 -0
- package/cpp/HybridHashtable.cpp +211 -0
- package/cpp/HybridHashtable.hpp +64 -0
- package/cpp/HybridHtmlToText.cpp +136 -0
- package/cpp/HybridHtmlToText.hpp +47 -0
- package/cpp/HybridHtmlToXml.cpp +218 -0
- package/cpp/HybridHtmlToXml.hpp +65 -0
- package/cpp/HybridHttp.cpp +2067 -0
- package/cpp/HybridHttp.hpp +416 -0
- package/cpp/HybridHttpCurl.cpp +337 -0
- package/cpp/HybridHttpCurl.hpp +93 -0
- package/cpp/HybridHttpRequest.cpp +455 -0
- package/cpp/HybridHttpRequest.hpp +109 -0
- package/cpp/HybridHttpResponse.cpp +340 -0
- package/cpp/HybridHttpResponse.hpp +86 -0
- package/cpp/HybridImap.cpp +1818 -0
- package/cpp/HybridImap.hpp +363 -0
- package/cpp/HybridJavaKeyStore.cpp +387 -0
- package/cpp/HybridJavaKeyStore.hpp +98 -0
- package/cpp/HybridJs.cpp +154 -0
- package/cpp/HybridJs.hpp +54 -0
- package/cpp/HybridJsonArray.cpp +441 -0
- package/cpp/HybridJsonArray.hpp +120 -0
- package/cpp/HybridJsonObject.cpp +1125 -0
- package/cpp/HybridJsonObject.hpp +260 -0
- package/cpp/HybridJwe.cpp +294 -0
- package/cpp/HybridJwe.hpp +82 -0
- package/cpp/HybridJws.cpp +290 -0
- package/cpp/HybridJws.hpp +82 -0
- package/cpp/HybridJwt.cpp +198 -0
- package/cpp/HybridJwt.hpp +57 -0
- package/cpp/HybridLog.cpp +212 -0
- package/cpp/HybridLog.hpp +63 -0
- package/cpp/HybridMailMan.cpp +1853 -0
- package/cpp/HybridMailMan.hpp +386 -0
- package/cpp/HybridMailboxes.cpp +165 -0
- package/cpp/HybridMailboxes.hpp +54 -0
- package/cpp/HybridMcp.cpp +322 -0
- package/cpp/HybridMcp.hpp +85 -0
- package/cpp/HybridMessageSet.cpp +162 -0
- package/cpp/HybridMessageSet.hpp +54 -0
- package/cpp/HybridMht.cpp +700 -0
- package/cpp/HybridMht.hpp +165 -0
- package/cpp/HybridMime.cpp +1119 -0
- package/cpp/HybridMime.hpp +266 -0
- package/cpp/HybridNtlm.cpp +333 -0
- package/cpp/HybridNtlm.hpp +83 -0
- package/cpp/HybridOAuth1.cpp +307 -0
- package/cpp/HybridOAuth1.hpp +78 -0
- package/cpp/HybridOAuth2.cpp +515 -0
- package/cpp/HybridOAuth2.hpp +127 -0
- package/cpp/HybridPdf.cpp +370 -0
- package/cpp/HybridPdf.hpp +103 -0
- package/cpp/HybridPem.cpp +327 -0
- package/cpp/HybridPem.hpp +88 -0
- package/cpp/HybridPfx.cpp +343 -0
- package/cpp/HybridPfx.hpp +87 -0
- package/cpp/HybridPkcs11.cpp +318 -0
- package/cpp/HybridPkcs11.hpp +88 -0
- package/cpp/HybridPrivateKey.cpp +464 -0
- package/cpp/HybridPrivateKey.hpp +117 -0
- package/cpp/HybridPrng.cpp +192 -0
- package/cpp/HybridPrng.hpp +57 -0
- package/cpp/HybridPublicKey.cpp +238 -0
- package/cpp/HybridPublicKey.hpp +68 -0
- package/cpp/HybridRest.cpp +993 -0
- package/cpp/HybridRest.hpp +214 -0
- package/cpp/HybridRsa.cpp +348 -0
- package/cpp/HybridRsa.hpp +90 -0
- package/cpp/HybridSCard.cpp +328 -0
- package/cpp/HybridSCard.hpp +91 -0
- package/cpp/HybridSFtp.cpp +1889 -0
- package/cpp/HybridSFtp.hpp +366 -0
- package/cpp/HybridSFtpDir.cpp +119 -0
- package/cpp/HybridSFtpDir.hpp +43 -0
- package/cpp/HybridSFtpFile.cpp +203 -0
- package/cpp/HybridSFtpFile.hpp +60 -0
- package/cpp/HybridScMinidriver.cpp +341 -0
- package/cpp/HybridScMinidriver.hpp +88 -0
- package/cpp/HybridScp.cpp +398 -0
- package/cpp/HybridScp.hpp +96 -0
- package/cpp/HybridSecrets.cpp +328 -0
- package/cpp/HybridSecrets.hpp +84 -0
- package/cpp/HybridSecureString.cpp +175 -0
- package/cpp/HybridSecureString.hpp +55 -0
- package/cpp/HybridServerSentEvent.cpp +112 -0
- package/cpp/HybridServerSentEvent.hpp +41 -0
- package/cpp/HybridSocket.cpp +1567 -0
- package/cpp/HybridSocket.hpp +336 -0
- package/cpp/HybridSpider.cpp +543 -0
- package/cpp/HybridSpider.hpp +138 -0
- package/cpp/HybridSsh.cpp +1330 -0
- package/cpp/HybridSsh.hpp +282 -0
- package/cpp/HybridSshKey.cpp +310 -0
- package/cpp/HybridSshKey.hpp +83 -0
- package/cpp/HybridSshTunnel.cpp +687 -0
- package/cpp/HybridSshTunnel.hpp +159 -0
- package/cpp/HybridStream.cpp +496 -0
- package/cpp/HybridStream.hpp +123 -0
- package/cpp/HybridStringArray.cpp +368 -0
- package/cpp/HybridStringArray.hpp +99 -0
- package/cpp/HybridStringBuilder.cpp +739 -0
- package/cpp/HybridStringBuilder.hpp +178 -0
- package/cpp/HybridStringTable.cpp +218 -0
- package/cpp/HybridStringTable.hpp +66 -0
- package/cpp/HybridTar.cpp +547 -0
- package/cpp/HybridTar.hpp +134 -0
- package/cpp/HybridTrustedRoots.cpp +178 -0
- package/cpp/HybridTrustedRoots.hpp +61 -0
- package/cpp/HybridUnixCompress.cpp +191 -0
- package/cpp/HybridUnixCompress.hpp +60 -0
- package/cpp/HybridUpload.cpp +427 -0
- package/cpp/HybridUpload.hpp +114 -0
- package/cpp/HybridUrl.cpp +152 -0
- package/cpp/HybridUrl.hpp +48 -0
- package/cpp/HybridWebSocket.cpp +378 -0
- package/cpp/HybridWebSocket.hpp +103 -0
- package/cpp/HybridXml.cpp +1527 -0
- package/cpp/HybridXml.hpp +340 -0
- package/cpp/HybridXmlCertVault.cpp +215 -0
- package/cpp/HybridXmlCertVault.hpp +63 -0
- package/cpp/HybridXmlDSig.cpp +328 -0
- package/cpp/HybridXmlDSig.hpp +88 -0
- package/cpp/HybridXmlDSigGen.cpp +549 -0
- package/cpp/HybridXmlDSigGen.hpp +126 -0
- package/cpp/HybridXmp.cpp +329 -0
- package/cpp/HybridXmp.hpp +86 -0
- package/cpp/HybridZip.cpp +1000 -0
- package/cpp/HybridZip.hpp +226 -0
- package/cpp/HybridZipCrc.cpp +162 -0
- package/cpp/HybridZipCrc.hpp +57 -0
- package/cpp/HybridZipEntry.cpp +395 -0
- package/cpp/HybridZipEntry.hpp +102 -0
- package/cpp/runtime/AsyncCall.hpp +96 -0
- package/cpp/runtime/Bytes.hpp +49 -0
- package/cpp/runtime/ChilkatError.hpp +66 -0
- package/cpp/runtime/ChilkatObject.hpp +219 -0
- package/cpp/runtime/ProgLang.hpp +9 -0
- package/cpp/runtime/ProgressAdapter.hpp +43 -0
- package/nitro.json +113 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/ChilkatRN+autolinking.cmake +179 -0
- package/nitrogen/generated/android/ChilkatRN+autolinking.gradle +27 -0
- package/nitrogen/generated/android/ChilkatRNOnLoad.cpp +1029 -0
- package/nitrogen/generated/android/ChilkatRNOnLoad.hpp +34 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/chilkat/ChilkatRNOnLoad.kt +35 -0
- package/nitrogen/generated/ios/ChilkatRN+autolinking.rb +62 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Bridge.hpp +27 -0
- package/nitrogen/generated/ios/ChilkatRN-Swift-Cxx-Umbrella.hpp +38 -0
- package/nitrogen/generated/ios/ChilkatRNAutolinking.mm +1015 -0
- package/nitrogen/generated/ios/ChilkatRNAutolinking.swift +16 -0
- package/nitrogen/generated/shared/c++/HybridAiSpec.cpp +114 -0
- package/nitrogen/generated/shared/c++/HybridAiSpec.hpp +175 -0
- package/nitrogen/generated/shared/c++/HybridAsnSpec.cpp +70 -0
- package/nitrogen/generated/shared/c++/HybridAsnSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridAuthAwsSpec.cpp +49 -0
- package/nitrogen/generated/shared/c++/HybridAuthAwsSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureSASSpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureSASSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureStorageSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridAuthAzureStorageSpec.hpp +81 -0
- package/nitrogen/generated/shared/c++/HybridAuthGoogleSpec.cpp +56 -0
- package/nitrogen/generated/shared/c++/HybridAuthGoogleSpec.hpp +108 -0
- package/nitrogen/generated/shared/c++/HybridBinDataSpec.cpp +69 -0
- package/nitrogen/generated/shared/c++/HybridBinDataSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridBz2Spec.cpp +47 -0
- package/nitrogen/generated/shared/c++/HybridBz2Spec.hpp +93 -0
- package/nitrogen/generated/shared/c++/HybridCacheSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridCacheSpec.hpp +106 -0
- package/nitrogen/generated/shared/c++/HybridCertChainSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridCertChainSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridCertSpec.cpp +138 -0
- package/nitrogen/generated/shared/c++/HybridCertSpec.hpp +205 -0
- package/nitrogen/generated/shared/c++/HybridCertStoreSpec.cpp +55 -0
- package/nitrogen/generated/shared/c++/HybridCertStoreSpec.hpp +104 -0
- package/nitrogen/generated/shared/c++/HybridCharsetSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridCharsetSpec.hpp +101 -0
- package/nitrogen/generated/shared/c++/HybridCkDateTimeSpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridCkDateTimeSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridCodeSignSpec.cpp +44 -0
- package/nitrogen/generated/shared/c++/HybridCodeSignSpec.hpp +93 -0
- package/nitrogen/generated/shared/c++/HybridCompressionSpec.cpp +79 -0
- package/nitrogen/generated/shared/c++/HybridCompressionSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridCrypt2Spec.cpp +215 -0
- package/nitrogen/generated/shared/c++/HybridCrypt2Spec.hpp +283 -0
- package/nitrogen/generated/shared/c++/HybridCsrSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridCsrSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridCsvSpec.cpp +72 -0
- package/nitrogen/generated/shared/c++/HybridCsvSpec.hpp +121 -0
- package/nitrogen/generated/shared/c++/HybridDhSpec.cpp +37 -0
- package/nitrogen/generated/shared/c++/HybridDhSpec.hpp +77 -0
- package/nitrogen/generated/shared/c++/HybridDirTreeSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridDirTreeSpec.hpp +86 -0
- package/nitrogen/generated/shared/c++/HybridDkimSpec.cpp +60 -0
- package/nitrogen/generated/shared/c++/HybridDkimSpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridDnsSpec.cpp +51 -0
- package/nitrogen/generated/shared/c++/HybridDnsSpec.hpp +97 -0
- package/nitrogen/generated/shared/c++/HybridDsaSpec.cpp +73 -0
- package/nitrogen/generated/shared/c++/HybridDsaSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridDtObjSpec.cpp +50 -0
- package/nitrogen/generated/shared/c++/HybridDtObjSpec.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridEccSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridEccSpec.hpp +96 -0
- package/nitrogen/generated/shared/c++/HybridEdDSASpec.cpp +38 -0
- package/nitrogen/generated/shared/c++/HybridEdDSASpec.hpp +90 -0
- package/nitrogen/generated/shared/c++/HybridEmailBundleSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridEmailBundleSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridEmailSpec.cpp +259 -0
- package/nitrogen/generated/shared/c++/HybridEmailSpec.hpp +326 -0
- package/nitrogen/generated/shared/c++/HybridFileAccessSpec.cpp +90 -0
- package/nitrogen/generated/shared/c++/HybridFileAccessSpec.hpp +140 -0
- package/nitrogen/generated/shared/c++/HybridFtp2Spec.cpp +367 -0
- package/nitrogen/generated/shared/c++/HybridFtp2Spec.hpp +434 -0
- package/nitrogen/generated/shared/c++/HybridGlobalSpec.cpp +59 -0
- package/nitrogen/generated/shared/c++/HybridGlobalSpec.hpp +99 -0
- package/nitrogen/generated/shared/c++/HybridGzipSpec.cpp +79 -0
- package/nitrogen/generated/shared/c++/HybridGzipSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridHashtableSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridHashtableSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToTextSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToTextSpec.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToXmlSpec.cpp +49 -0
- package/nitrogen/generated/shared/c++/HybridHtmlToXmlSpec.hpp +95 -0
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.cpp +67 -0
- package/nitrogen/generated/shared/c++/HybridHttpCurlSpec.hpp +125 -0
- package/nitrogen/generated/shared/c++/HybridHttpRequestSpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridHttpRequestSpec.hpp +122 -0
- package/nitrogen/generated/shared/c++/HybridHttpResponseSpec.cpp +64 -0
- package/nitrogen/generated/shared/c++/HybridHttpResponseSpec.hpp +119 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.cpp +334 -0
- package/nitrogen/generated/shared/c++/HybridHttpSpec.hpp +407 -0
- package/nitrogen/generated/shared/c++/HybridImapSpec.cpp +275 -0
- package/nitrogen/generated/shared/c++/HybridImapSpec.hpp +360 -0
- package/nitrogen/generated/shared/c++/HybridJavaKeyStoreSpec.cpp +65 -0
- package/nitrogen/generated/shared/c++/HybridJavaKeyStoreSpec.hpp +132 -0
- package/nitrogen/generated/shared/c++/HybridJsSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridJsSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridJsonArraySpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridJsonArraySpec.hpp +131 -0
- package/nitrogen/generated/shared/c++/HybridJsonObjectSpec.cpp +154 -0
- package/nitrogen/generated/shared/c++/HybridJsonObjectSpec.hpp +218 -0
- package/nitrogen/generated/shared/c++/HybridJweSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridJweSpec.hpp +112 -0
- package/nitrogen/generated/shared/c++/HybridJwsSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridJwsSpec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridJwtSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridJwtSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridLogSpec.cpp +44 -0
- package/nitrogen/generated/shared/c++/HybridLogSpec.hpp +85 -0
- package/nitrogen/generated/shared/c++/HybridMailManSpec.cpp +311 -0
- package/nitrogen/generated/shared/c++/HybridMailManSpec.hpp +396 -0
- package/nitrogen/generated/shared/c++/HybridMailboxesSpec.cpp +40 -0
- package/nitrogen/generated/shared/c++/HybridMailboxesSpec.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridMcpSpec.cpp +68 -0
- package/nitrogen/generated/shared/c++/HybridMcpSpec.hpp +117 -0
- package/nitrogen/generated/shared/c++/HybridMessageSetSpec.cpp +41 -0
- package/nitrogen/generated/shared/c++/HybridMessageSetSpec.hpp +84 -0
- package/nitrogen/generated/shared/c++/HybridMhtSpec.cpp +138 -0
- package/nitrogen/generated/shared/c++/HybridMhtSpec.hpp +181 -0
- package/nitrogen/generated/shared/c++/HybridMimeSpec.cpp +169 -0
- package/nitrogen/generated/shared/c++/HybridMimeSpec.hpp +233 -0
- package/nitrogen/generated/shared/c++/HybridNtlmSpec.cpp +69 -0
- package/nitrogen/generated/shared/c++/HybridNtlmSpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridOAuth1Spec.cpp +67 -0
- package/nitrogen/generated/shared/c++/HybridOAuth1Spec.hpp +110 -0
- package/nitrogen/generated/shared/c++/HybridOAuth2Spec.cpp +107 -0
- package/nitrogen/generated/shared/c++/HybridOAuth2Spec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.cpp +73 -0
- package/nitrogen/generated/shared/c++/HybridPdfSpec.hpp +134 -0
- package/nitrogen/generated/shared/c++/HybridPemSpec.cpp +63 -0
- package/nitrogen/generated/shared/c++/HybridPemSpec.hpp +124 -0
- package/nitrogen/generated/shared/c++/HybridPfxSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridPfxSpec.hpp +122 -0
- package/nitrogen/generated/shared/c++/HybridPkcs11Spec.cpp +60 -0
- package/nitrogen/generated/shared/c++/HybridPkcs11Spec.hpp +115 -0
- package/nitrogen/generated/shared/c++/HybridPrivateKeySpec.cpp +76 -0
- package/nitrogen/generated/shared/c++/HybridPrivateKeySpec.hpp +131 -0
- package/nitrogen/generated/shared/c++/HybridPrngSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridPrngSpec.hpp +85 -0
- package/nitrogen/generated/shared/c++/HybridPublicKeySpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridPublicKeySpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridRestSpec.cpp +150 -0
- package/nitrogen/generated/shared/c++/HybridRestSpec.hpp +229 -0
- package/nitrogen/generated/shared/c++/HybridRsaSpec.cpp +68 -0
- package/nitrogen/generated/shared/c++/HybridRsaSpec.hpp +120 -0
- package/nitrogen/generated/shared/c++/HybridSCardSpec.cpp +64 -0
- package/nitrogen/generated/shared/c++/HybridSCardSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/HybridSFtpDirSpec.cpp +35 -0
- package/nitrogen/generated/shared/c++/HybridSFtpDirSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridSFtpFileSpec.cpp +57 -0
- package/nitrogen/generated/shared/c++/HybridSFtpFileSpec.hpp +98 -0
- package/nitrogen/generated/shared/c++/HybridSFtpSpec.cpp +284 -0
- package/nitrogen/generated/shared/c++/HybridSFtpSpec.hpp +354 -0
- package/nitrogen/generated/shared/c++/HybridScMinidriverSpec.cpp +61 -0
- package/nitrogen/generated/shared/c++/HybridScMinidriverSpec.hpp +119 -0
- package/nitrogen/generated/shared/c++/HybridScpSpec.cpp +78 -0
- package/nitrogen/generated/shared/c++/HybridScpSpec.hpp +127 -0
- package/nitrogen/generated/shared/c++/HybridSecretsSpec.cpp +65 -0
- package/nitrogen/generated/shared/c++/HybridSecretsSpec.hpp +120 -0
- package/nitrogen/generated/shared/c++/HybridSecureStringSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridSecureStringSpec.hpp +88 -0
- package/nitrogen/generated/shared/c++/HybridServerSentEventSpec.cpp +35 -0
- package/nitrogen/generated/shared/c++/HybridServerSentEventSpec.hpp +75 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.cpp +262 -0
- package/nitrogen/generated/shared/c++/HybridSocketSpec.hpp +327 -0
- package/nitrogen/generated/shared/c++/HybridSpiderSpec.cpp +110 -0
- package/nitrogen/generated/shared/c++/HybridSpiderSpec.hpp +153 -0
- package/nitrogen/generated/shared/c++/HybridSshKeySpec.cpp +59 -0
- package/nitrogen/generated/shared/c++/HybridSshKeySpec.hpp +102 -0
- package/nitrogen/generated/shared/c++/HybridSshSpec.cpp +215 -0
- package/nitrogen/generated/shared/c++/HybridSshSpec.hpp +276 -0
- package/nitrogen/generated/shared/c++/HybridSshTunnelSpec.cpp +136 -0
- package/nitrogen/generated/shared/c++/HybridSshTunnelSpec.hpp +191 -0
- package/nitrogen/generated/shared/c++/HybridStreamSpec.cpp +100 -0
- package/nitrogen/generated/shared/c++/HybridStreamSpec.hpp +150 -0
- package/nitrogen/generated/shared/c++/HybridStringArraySpec.cpp +66 -0
- package/nitrogen/generated/shared/c++/HybridStringArraySpec.hpp +109 -0
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.cpp +104 -0
- package/nitrogen/generated/shared/c++/HybridStringBuilderSpec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridStringTableSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridStringTableSpec.hpp +89 -0
- package/nitrogen/generated/shared/c++/HybridTarSpec.cpp +110 -0
- package/nitrogen/generated/shared/c++/HybridTarSpec.hpp +156 -0
- package/nitrogen/generated/shared/c++/HybridTrustedRootsSpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridTrustedRootsSpec.hpp +97 -0
- package/nitrogen/generated/shared/c++/HybridUnixCompressSpec.cpp +48 -0
- package/nitrogen/generated/shared/c++/HybridUnixCompressSpec.hpp +91 -0
- package/nitrogen/generated/shared/c++/HybridUploadSpec.cpp +98 -0
- package/nitrogen/generated/shared/c++/HybridUploadSpec.hpp +141 -0
- package/nitrogen/generated/shared/c++/HybridUrlSpec.cpp +42 -0
- package/nitrogen/generated/shared/c++/HybridUrlSpec.hpp +82 -0
- package/nitrogen/generated/shared/c++/HybridWebSocketSpec.cpp +80 -0
- package/nitrogen/generated/shared/c++/HybridWebSocketSpec.hpp +135 -0
- package/nitrogen/generated/shared/c++/HybridXmlCertVaultSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridXmlCertVaultSpec.hpp +94 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigGenSpec.cpp +99 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigGenSpec.hpp +163 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigSpec.cpp +62 -0
- package/nitrogen/generated/shared/c++/HybridXmlDSigSpec.hpp +126 -0
- package/nitrogen/generated/shared/c++/HybridXmlSpec.cpp +203 -0
- package/nitrogen/generated/shared/c++/HybridXmlSpec.hpp +253 -0
- package/nitrogen/generated/shared/c++/HybridXmpSpec.cpp +58 -0
- package/nitrogen/generated/shared/c++/HybridXmpSpec.hpp +104 -0
- package/nitrogen/generated/shared/c++/HybridZipCrcSpec.cpp +43 -0
- package/nitrogen/generated/shared/c++/HybridZipCrcSpec.hpp +92 -0
- package/nitrogen/generated/shared/c++/HybridZipEntrySpec.cpp +82 -0
- package/nitrogen/generated/shared/c++/HybridZipEntrySpec.hpp +137 -0
- package/nitrogen/generated/shared/c++/HybridZipSpec.cpp +176 -0
- package/nitrogen/generated/shared/c++/HybridZipSpec.hpp +231 -0
- package/package.json +46 -0
- package/react-native.config.js +9 -0
- package/scripts/fetch-chilkat.js +184 -0
- package/src/index.ts +306 -0
- package/src/runtime/chilkat.ts +25 -0
- package/src/specs/Ai.nitro.ts +1288 -0
- package/src/specs/Asn.nitro.ts +509 -0
- package/src/specs/AuthAws.nitro.ts +234 -0
- package/src/specs/AuthAzureSAS.nitro.ts +205 -0
- package/src/specs/AuthAzureStorage.nitro.ts +172 -0
- package/src/specs/AuthGoogle.nitro.ts +291 -0
- package/src/specs/BinData.nitro.ts +470 -0
- package/src/specs/Bz2.nitro.ts +269 -0
- package/src/specs/Cache.nitro.ts +483 -0
- package/src/specs/Cert.nitro.ts +1279 -0
- package/src/specs/CertChain.nitro.ts +312 -0
- package/src/specs/CertStore.nitro.ts +430 -0
- package/src/specs/Charset.nitro.ts +518 -0
- package/src/specs/CkDateTime.nitro.ts +492 -0
- package/src/specs/CodeSign.nitro.ts +307 -0
- package/src/specs/Compression.nitro.ts +654 -0
- package/src/specs/Crypt2.nitro.ts +2387 -0
- package/src/specs/Csr.nitro.ts +461 -0
- package/src/specs/Csv.nitro.ts +670 -0
- package/src/specs/Dh.nitro.ts +343 -0
- package/src/specs/DirTree.nitro.ts +332 -0
- package/src/specs/Dkim.nitro.ts +595 -0
- package/src/specs/Dns.nitro.ts +271 -0
- package/src/specs/Dsa.nitro.ts +653 -0
- package/src/specs/DtObj.nitro.ts +198 -0
- package/src/specs/Ecc.nitro.ts +375 -0
- package/src/specs/EdDSA.nitro.ts +273 -0
- package/src/specs/Email.nitro.ts +2921 -0
- package/src/specs/EmailBundle.nitro.ts +334 -0
- package/src/specs/FileAccess.nitro.ts +836 -0
- package/src/specs/Ftp2.nitro.ts +3943 -0
- package/src/specs/Global.nitro.ts +319 -0
- package/src/specs/Gzip.nitro.ts +646 -0
- package/src/specs/Hashtable.nitro.ts +356 -0
- package/src/specs/HtmlToText.nitro.ts +238 -0
- package/src/specs/HtmlToXml.nitro.ts +323 -0
- package/src/specs/Http.nitro.ts +3095 -0
- package/src/specs/HttpCurl.nitro.ts +550 -0
- package/src/specs/HttpRequest.nitro.ts +522 -0
- package/src/specs/HttpResponse.nitro.ts +424 -0
- package/src/specs/Imap.nitro.ts +2991 -0
- package/src/specs/JavaKeyStore.nitro.ts +619 -0
- package/src/specs/Js.nitro.ts +263 -0
- package/src/specs/JsonArray.nitro.ts +681 -0
- package/src/specs/JsonObject.nitro.ts +1454 -0
- package/src/specs/Jwe.nitro.ts +756 -0
- package/src/specs/Jws.nitro.ts +733 -0
- package/src/specs/Jwt.nitro.ts +380 -0
- package/src/specs/Log.nitro.ts +258 -0
- package/src/specs/MailMan.nitro.ts +3571 -0
- package/src/specs/Mailboxes.nitro.ts +251 -0
- package/src/specs/Mcp.nitro.ts +491 -0
- package/src/specs/MessageSet.nitro.ts +320 -0
- package/src/specs/Mht.nitro.ts +1684 -0
- package/src/specs/Mime.nitro.ts +1745 -0
- package/src/specs/Ntlm.nitro.ts +556 -0
- package/src/specs/OAuth1.nitro.ts +331 -0
- package/src/specs/OAuth2.nitro.ts +1023 -0
- package/src/specs/Pdf.nitro.ts +740 -0
- package/src/specs/Pem.nitro.ts +484 -0
- package/src/specs/Pfx.nitro.ts +1003 -0
- package/src/specs/Pkcs11.nitro.ts +559 -0
- package/src/specs/PrivateKey.nitro.ts +994 -0
- package/src/specs/Prng.nitro.ts +348 -0
- package/src/specs/PublicKey.nitro.ts +610 -0
- package/src/specs/Rest.nitro.ts +1972 -0
- package/src/specs/Rsa.nitro.ts +453 -0
- package/src/specs/SCard.nitro.ts +739 -0
- package/src/specs/SFtp.nitro.ts +3138 -0
- package/src/specs/SFtpDir.nitro.ts +213 -0
- package/src/specs/SFtpFile.nitro.ts +452 -0
- package/src/specs/ScMinidriver.nitro.ts +443 -0
- package/src/specs/Scp.nitro.ts +708 -0
- package/src/specs/Secrets.nitro.ts +470 -0
- package/src/specs/SecureString.nitro.ts +231 -0
- package/src/specs/ServerSentEvent.nitro.ts +183 -0
- package/src/specs/Socket.nitro.ts +3335 -0
- package/src/specs/Spider.nitro.ts +609 -0
- package/src/specs/Ssh.nitro.ts +2842 -0
- package/src/specs/SshKey.nitro.ts +740 -0
- package/src/specs/SshTunnel.nitro.ts +1243 -0
- package/src/specs/Stream.nitro.ts +737 -0
- package/src/specs/StringArray.nitro.ts +396 -0
- package/src/specs/StringBuilder.nitro.ts +920 -0
- package/src/specs/StringTable.nitro.ts +271 -0
- package/src/specs/Tar.nitro.ts +804 -0
- package/src/specs/TrustedRoots.nitro.ts +360 -0
- package/src/specs/UnixCompress.nitro.ts +293 -0
- package/src/specs/Upload.nitro.ts +623 -0
- package/src/specs/Url.nitro.ts +246 -0
- package/src/specs/WebSocket.nitro.ts +840 -0
- package/src/specs/Xml.nitro.ts +1988 -0
- package/src/specs/XmlCertVault.nitro.ts +259 -0
- package/src/specs/XmlDSig.nitro.ts +464 -0
- package/src/specs/XmlDSigGen.nitro.ts +978 -0
- package/src/specs/Xmp.nitro.ts +364 -0
- package/src/specs/Zip.nitro.ts +1611 -0
- package/src/specs/ZipCrc.nitro.ts +229 -0
- package/src/specs/ZipEntry.nitro.ts +782 -0
|
@@ -0,0 +1,1288 @@
|
|
|
1
|
+
// Generated by ReactNativeNs.RnGenerator -- do not edit.
|
|
2
|
+
import type { HybridObject } from 'react-native-nitro-modules'
|
|
3
|
+
import type { BinData } from './BinData.nitro'
|
|
4
|
+
import type { JsonObject } from './JsonObject.nitro'
|
|
5
|
+
import type { Mcp } from './Mcp.nitro'
|
|
6
|
+
import type { Socket } from './Socket.nitro'
|
|
7
|
+
import type { StringBuilder } from './StringBuilder.nitro'
|
|
8
|
+
import type { StringTable } from './StringTable.nitro'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Use one consistent API for multiple AI providers.
|
|
12
|
+
*
|
|
13
|
+
* `Ai` provides a unified interface for sending prompts,
|
|
14
|
+
* multimodal input, conversations, streaming requests, tool calls, and file
|
|
15
|
+
* references to many AI providers. Instead of writing separate REST integrations
|
|
16
|
+
* for each vendor, applications can use one Chilkat API while Chilkat handles
|
|
17
|
+
* provider-specific differences in authentication, request formatting, response
|
|
18
|
+
* parsing, streaming events, and tool-calling workflows.
|
|
19
|
+
*
|
|
20
|
+
* OpenAI
|
|
21
|
+
* Google Gemini
|
|
22
|
+
* Anthropic Claude
|
|
23
|
+
* xAI Grok
|
|
24
|
+
* Mistral
|
|
25
|
+
* DeepSeek
|
|
26
|
+
* Perplexity
|
|
27
|
+
* Custom Providers
|
|
28
|
+
*
|
|
29
|
+
* **Portable provider access**
|
|
30
|
+
*
|
|
31
|
+
* Write code once and switch providers by changing settings such as
|
|
32
|
+
* `Provider`, `Model`, `ApiKey`,
|
|
33
|
+
* `BaseUrl`, and `ApiSpec`.
|
|
34
|
+
*
|
|
35
|
+
* **Conversations**
|
|
36
|
+
*
|
|
37
|
+
* Create, select, export, import, list, and delete named conversations.
|
|
38
|
+
* Chilkat can maintain local transcripts or use provider-hosted conversation
|
|
39
|
+
* state where supported.
|
|
40
|
+
*
|
|
41
|
+
* **Multimodal input**
|
|
42
|
+
*
|
|
43
|
+
* Add text, image data, image URLs, file data, file URLs, and uploaded file
|
|
44
|
+
* references to the next request.
|
|
45
|
+
*
|
|
46
|
+
* **Streaming responses**
|
|
47
|
+
*
|
|
48
|
+
* Use `Streaming`, `PollAi`, and
|
|
49
|
+
* `NextAiEvent` to receive incremental output and standardized
|
|
50
|
+
* streaming events.
|
|
51
|
+
*
|
|
52
|
+
* **Tool calling**
|
|
53
|
+
*
|
|
54
|
+
* Supports manual function tool calling and automatic JavaScript tool
|
|
55
|
+
* calling, including safeguards such as tool timeouts and iteration limits.
|
|
56
|
+
*
|
|
57
|
+
* **File upload and reuse**
|
|
58
|
+
*
|
|
59
|
+
* Upload files once, receive a file ID or URI, and reference that file in
|
|
60
|
+
* later requests when supported by the provider.
|
|
61
|
+
*
|
|
62
|
+
* **Starting in v11.4.0:**
|
|
63
|
+
* `Ai` adds manual tool function calling, automatic
|
|
64
|
+
* JavaScript tool calling, file uploads for later reference by file ID, and
|
|
65
|
+
* conversational image output for providers that support it.
|
|
66
|
+
*
|
|
67
|
+
* AI responses are often returned as Markdown. Chilkat also provides Markdown
|
|
68
|
+
* to HTML support in the `StringBuilder` class, including streaming
|
|
69
|
+
* Markdown-to-HTML conversion for applications that display AI output as it is
|
|
70
|
+
* generated.
|
|
71
|
+
*
|
|
72
|
+
* Also see
|
|
73
|
+
* [Markdown to HTML Overview](https://www.chilkatsoft.com/markdown_to_html_overview.asp).
|
|
74
|
+
* For an extended overview, see
|
|
75
|
+
* [Ai Class Overview](https://www.chilkatsoft.com/ai_class_overview.asp).
|
|
76
|
+
*
|
|
77
|
+
* Each `Ai` instance owns a native Chilkat object. It is released when the JavaScript object is
|
|
78
|
+
* garbage collected, or immediately by `dispose()`; any use after `dispose()` throws.
|
|
79
|
+
* Create one with `new Ai()`.
|
|
80
|
+
*
|
|
81
|
+
* Methods that can take a while (network, files, compression, key generation) also have an
|
|
82
|
+
* `...Async` form returning a `Promise`; it runs on a native worker thread so the UI keeps
|
|
83
|
+
* rendering. While such a call is pending, every other call on this object throws, except
|
|
84
|
+
* {@link Ai.abort} and assigning {@link Ai.onPercentDone} / {@link Ai.onProgressInfo}.
|
|
85
|
+
*/
|
|
86
|
+
export interface Ai extends HybridObject<{ ios: 'c++', android: 'c++' }> {
|
|
87
|
+
// ---- Properties ----
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Provides HTML-formatted information about the last called method or property. If a method call
|
|
91
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
92
|
+
* available regardless of the method call's success.
|
|
93
|
+
*
|
|
94
|
+
* This property is read-only.
|
|
95
|
+
*/
|
|
96
|
+
readonly lastErrorHtml: string
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Provides plain text information about the last called method or property. If a method call
|
|
100
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
101
|
+
* available regardless of the method call's success.
|
|
102
|
+
*
|
|
103
|
+
* This property is read-only.
|
|
104
|
+
*/
|
|
105
|
+
readonly lastErrorText: string
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Provides XML-formatted information about the last called method or property. If a method call
|
|
109
|
+
* fails or behaves unexpectedly, check this property for details. Note that information is
|
|
110
|
+
* available regardless of the method call's success.
|
|
111
|
+
*
|
|
112
|
+
* This property is read-only.
|
|
113
|
+
*/
|
|
114
|
+
readonly lastErrorXml: string
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Version of the component/library, such as "10.1.0"
|
|
118
|
+
*
|
|
119
|
+
* This property is read-only.
|
|
120
|
+
*/
|
|
121
|
+
readonly version: string
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* If set to a file path, this property logs the LastErrorText of each Chilkat method or property
|
|
125
|
+
* call to the specified file. This logging helps identify the context and history of Chilkat
|
|
126
|
+
* calls leading up to any crash or hang, aiding in debugging.
|
|
127
|
+
*
|
|
128
|
+
* Enabling the VerboseLogging property provides more detailed information.
|
|
129
|
+
*
|
|
130
|
+
* This property is mainly used for debugging rare instances where a Chilkat method call causes a
|
|
131
|
+
* hang or crash, which should generally not happen.
|
|
132
|
+
*
|
|
133
|
+
* Possible causes of hangs include:
|
|
134
|
+
*
|
|
135
|
+
* - A timeout property set to 0, indicating an infinite timeout.
|
|
136
|
+
*
|
|
137
|
+
* - A hang occurring within an event callback in the application code.
|
|
138
|
+
*
|
|
139
|
+
* - An internal bug in the Chilkat code causing the hang.
|
|
140
|
+
*/
|
|
141
|
+
debugLogFilePath: string
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* If set to `true`, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may
|
|
145
|
+
* contain more verbose information. The default value is `false`. Verbose logging should only be
|
|
146
|
+
* used for debugging. The potentially large quantity of logged information may adversely affect
|
|
147
|
+
* peformance.
|
|
148
|
+
*/
|
|
149
|
+
verboseLogging: boolean
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Indicates the success or failure of the most recent method call: `true` means success, `false`
|
|
153
|
+
* means failure. This property remains unchanged by property setters or getters. This method is
|
|
154
|
+
* present to address challenges in checking for null or Nothing returns in certain programming
|
|
155
|
+
* languages. Note: This property does not apply to methods that return integer values or to
|
|
156
|
+
* boolean-returning methods where the boolean does not indicate success or failure.
|
|
157
|
+
*/
|
|
158
|
+
lastMethodSuccess: boolean
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* This is the AI provider. Possible values are: `openai`, `google`, `claude`, `deepseek`,
|
|
162
|
+
* `perplexity`, `mistral`, and `xai`.
|
|
163
|
+
*
|
|
164
|
+
* Starting in Chilkat `v11.3.0`, this property can be set to `custom`, and the {@link Ai.baseUrl}
|
|
165
|
+
* and {@link Ai.apiSpec} properties can also be set to fully specify the provider.
|
|
166
|
+
*
|
|
167
|
+
* Starting in `v11.6.0`, this property can also be set to `openai-compatible`, a convenience
|
|
168
|
+
* alias for a `custom` provider that speaks the OpenAI Chat Completions API. It presets {@link
|
|
169
|
+
* Ai.apiSpec} to `ChatCompletions`, so you only need to set {@link Ai.baseUrl} (plus {@link
|
|
170
|
+
* Ai.apiKey} and {@link Ai.model}). This is the simplest way to use OpenAI-compatible endpoints
|
|
171
|
+
* such as Ollama, LM Studio, OpenWebUI, and many hosting providers.
|
|
172
|
+
*
|
|
173
|
+
* **Note:** `mistral` is recognized as a pre-configured known provider starting in `v11.4.0`.
|
|
174
|
+
*
|
|
175
|
+
* The default value is `openai`.
|
|
176
|
+
*/
|
|
177
|
+
provider: string
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* The currently selected conversation can be set to your desired conversation name. Once set, all
|
|
181
|
+
* future queries will be part of that conversation, updating its state with each input and
|
|
182
|
+
* output. By default, no conversation is selected, indicated by an empty string, leading to
|
|
183
|
+
* stateless queries. The first conversation created or imported will be automatically selected.
|
|
184
|
+
* If you attempt to select a non-existent conversation, the selection will not change. You can
|
|
185
|
+
* reset this property to an empty string to revert to stateless querying.
|
|
186
|
+
*/
|
|
187
|
+
selectedConvo: string
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* This is the API key used for authentication. Use your API key that matches your {@link
|
|
191
|
+
* Ai.provider}.
|
|
192
|
+
*
|
|
193
|
+
* **Suggestion**: Use Chilkat's `Secrets` class to store and retrieve API keys in any of the
|
|
194
|
+
* following locations.
|
|
195
|
+
*
|
|
196
|
+
* - Windows Credentials Manager
|
|
197
|
+
*
|
|
198
|
+
* - Apple Keychain
|
|
199
|
+
*
|
|
200
|
+
* - AWS Secrets Manager
|
|
201
|
+
*
|
|
202
|
+
* - Azure Key Vault
|
|
203
|
+
*
|
|
204
|
+
* - IBM Cloud Secrets Manager
|
|
205
|
+
*
|
|
206
|
+
* - Oracle Cloud Secrets
|
|
207
|
+
*
|
|
208
|
+
* - Doppler Secrets
|
|
209
|
+
*/
|
|
210
|
+
apiKey: string
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The model to be used for AI conversations. For example, `GPT-4o` or `GPT-5`. The list of
|
|
214
|
+
* available models can be obtained by calling {@link Ai.getModels}.
|
|
215
|
+
*
|
|
216
|
+
* The default value is the empty string. A model must always be specified. Chilkat won't try to
|
|
217
|
+
* guess or default to a model.
|
|
218
|
+
*/
|
|
219
|
+
model: string
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* For multimodal inputs like image data, image URLs, file data, and file URLs, the full data or
|
|
223
|
+
* URL is sent initially. If the property is set to `true`, the full data/URL is re-sent in
|
|
224
|
+
* subsequent interactions. If set to `false`, only the image or file summary is sent thereafter.
|
|
225
|
+
*
|
|
226
|
+
* By default, this property is `false`.
|
|
227
|
+
*
|
|
228
|
+
* `Full transcript style:` always send the entire conversation (including files/images).
|
|
229
|
+
* This guarantees the model has all context, but can get expensive.
|
|
230
|
+
*
|
|
231
|
+
* `Summarized transcript style:` for previously sent multimodal items, sends the summary message
|
|
232
|
+
* (e.g. “Earlier, I uploaded a PDF with account statements”) instead of the raw file or url
|
|
233
|
+
* itself.
|
|
234
|
+
*/
|
|
235
|
+
fullTranscript: boolean
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* When set to `true`, the {@link Ai.ask} method operates in streaming mode, returning immediately
|
|
239
|
+
* after the request is sent. You can then use the PollAi and NextAiEvent methods to receive
|
|
240
|
+
* streaming events. By default, this property is `false`.
|
|
241
|
+
*/
|
|
242
|
+
streaming: boolean
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The interval in milliseconds between each `AbortCheck` event callback, which enables an
|
|
246
|
+
* application to abort certain method calls before they complete. **By default, HeartbeatMs is
|
|
247
|
+
* set to **`0`**, meaning no AbortCheck event callbacks will trigger.**
|
|
248
|
+
*/
|
|
249
|
+
heartbeatMs: number
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* This applies to providers like OpenAI that can maintain conversation state on the server. If
|
|
253
|
+
* set to `true`, only the conversation ID is sent with each query. If set to `false`, the entire
|
|
254
|
+
* conversation transcript is sent with each query, making each query stateless.
|
|
255
|
+
*
|
|
256
|
+
* This only applies if a conversation is selected.
|
|
257
|
+
*
|
|
258
|
+
* The default value of this property is `false`.
|
|
259
|
+
*/
|
|
260
|
+
hostedConvo: boolean
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* This is a catch-all property to be used for uncommon needs. This property defaults to the empty
|
|
264
|
+
* string, and should typically remain empty.
|
|
265
|
+
*/
|
|
266
|
+
uncommonOptions: string
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The maximum amount of time to wait for additional incoming data when receiving a response. The
|
|
270
|
+
* default value is `90000` (90 seconds) in `v11.3.0` and earlier. Starting in `v11.4.0`, the
|
|
271
|
+
* default value is `180000` (180 seconds).
|
|
272
|
+
*
|
|
273
|
+
* This is not a total timeout, but the maximum time allowed when data transmission has paused.
|
|
274
|
+
*/
|
|
275
|
+
idleTimeoutMs: number
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* The HTTP response status code for the last {@link Ai.ask} is as follows:
|
|
279
|
+
*
|
|
280
|
+
* - `0` indicates an error occurred before receiving an HTTP response.
|
|
281
|
+
*
|
|
282
|
+
* - `200` indicates a successful response.
|
|
283
|
+
*
|
|
284
|
+
* - A failed response has a status code of `400` or higher.
|
|
285
|
+
*
|
|
286
|
+
* This property is read-only.
|
|
287
|
+
*/
|
|
288
|
+
readonly responseStatusCode: number
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Specifies the API specification to be used. Possible choices are `ChatCompletions`,
|
|
292
|
+
* `Responses`, `Gemini`, `Anthropic`. The default value is `Responses` because the default value
|
|
293
|
+
* of the {@link Ai.provider} property is `openai`. Setting the {@link Ai.provider} property to a
|
|
294
|
+
* value other than `custom` will also automatically set this property to the correct and needed
|
|
295
|
+
* value.
|
|
296
|
+
*/
|
|
297
|
+
apiSpec: string
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Specifies the provider's base URL. For example, `http://localhost:11434/v1` or
|
|
301
|
+
* `https://api.together.xyz/v1`. The default value is `https://api.openai.com/v1` because the
|
|
302
|
+
* default value of the {@link Ai.provider} property is `openai`. Setting the {@link Ai.provider}
|
|
303
|
+
* property to a value other than `custom` will also automatically set this property to the
|
|
304
|
+
* correct and needed value.
|
|
305
|
+
*/
|
|
306
|
+
baseUrl: string
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* For custom {@link Ai.provider}'s, use this field name for the API key in the HTTP header, but
|
|
310
|
+
* only if the API key is to be placed in a `custom` header field. If the API key is to be
|
|
311
|
+
* provided in an `"Authorization: Bearer"` header, then leave this property empty.
|
|
312
|
+
*
|
|
313
|
+
* The default value of this property is the empty string.
|
|
314
|
+
*/
|
|
315
|
+
apiKeyHeader: string
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* `true` if the response output has function calls. Otherwise `false`. This only applies to
|
|
319
|
+
* manual function tool calling, not automatic JS tool calls.
|
|
320
|
+
*
|
|
321
|
+
* This property is read-only.
|
|
322
|
+
*/
|
|
323
|
+
readonly hasFunctionCalls: boolean
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* The maximum time in seconds allowed for an automatic JavaScript tool function. The default
|
|
327
|
+
* value is 60 seconds to allow for most use cases, but to prevent an tool call that never
|
|
328
|
+
* returns.
|
|
329
|
+
*/
|
|
330
|
+
jsToolTimeout: number
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* If `true` a secret specifier of the format "!!part1|part2|.." can be provided instead of the
|
|
334
|
+
* actual value for the ApiKey property.
|
|
335
|
+
*
|
|
336
|
+
* The default value is `false`.
|
|
337
|
+
*/
|
|
338
|
+
enableSecrets: boolean
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Read-only. `true` if the model refused to produce the requested structured output during the
|
|
342
|
+
* most recent {@link Ai.ask}. When a refusal occurs, {@link Ai.getOutputJson} returns `false` and
|
|
343
|
+
* the provider's explanation is available in {@link Ai.refusalText}. This property is reset at
|
|
344
|
+
* the start of each {@link Ai.ask}.
|
|
345
|
+
*
|
|
346
|
+
* This property is read-only.
|
|
347
|
+
*/
|
|
348
|
+
readonly lastResponseRefused: boolean
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Read-only. When {@link Ai.lastResponseRefused} is `true`, this is the model's message
|
|
352
|
+
* explaining why it declined to produce the requested structured output. Otherwise it is the
|
|
353
|
+
* empty string.
|
|
354
|
+
*
|
|
355
|
+
* This property is read-only.
|
|
356
|
+
*/
|
|
357
|
+
readonly refusalText: string
|
|
358
|
+
|
|
359
|
+
// ---- Methods ----
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Creates and initializes a transcript for a new conversation. The `name` is a unique name for
|
|
363
|
+
* the conversation. You can reference the conversation by this name, such as for the {@link
|
|
364
|
+
* Ai.exportConvo} method.
|
|
365
|
+
*
|
|
366
|
+
* The `sysMsg` sets the broad behavior, tone, and role of the assistant.
|
|
367
|
+
*
|
|
368
|
+
* Example: `"You are a polite tutor who explains concepts clearly and simply."`
|
|
369
|
+
*
|
|
370
|
+
* Think of it as the high-level persona or instructions the model follows throughout the
|
|
371
|
+
* conversation. The `devMsg` provides more technical or policy-level guidance.
|
|
372
|
+
*
|
|
373
|
+
* Example: `"Always respond in Markdown. Do not reveal internal reasoning. Keep answers under 200
|
|
374
|
+
* words."`
|
|
375
|
+
*
|
|
376
|
+
* It’s like hidden scaffolding to enforce app rules, formatting, or safety constraints.
|
|
377
|
+
*
|
|
378
|
+
* **Note:** The first conversation created is automatically set as the {@link Ai.selectedConvo}.
|
|
379
|
+
* You can use any unique name for a conversation except `*`.
|
|
380
|
+
*
|
|
381
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
382
|
+
* {@link Ai.lastErrorText}.
|
|
383
|
+
*/
|
|
384
|
+
newConvo(name: string, sysMsg: string, devMsg: string): void
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Exports the conversation specified by `name` to `json`, replacing `json`'s contents with the
|
|
388
|
+
* exported transcript. You can later import a conversation using {@link Ai.importConvo}. The
|
|
389
|
+
* currently selected conversation can be exported by passing `*` for the `name`.
|
|
390
|
+
*
|
|
391
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
392
|
+
* {@link Ai.lastErrorText}.
|
|
393
|
+
*/
|
|
394
|
+
exportConvo(name: string, json: JsonObject): void
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Imports the conversation from `json` and assigns it the name in `name`.
|
|
398
|
+
*
|
|
399
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
400
|
+
* {@link Ai.lastErrorText}.
|
|
401
|
+
*/
|
|
402
|
+
importConvo(name: string, json: JsonObject): void
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Returns the full list of conversation names in `st`.
|
|
406
|
+
*
|
|
407
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
408
|
+
* {@link Ai.lastErrorText}.
|
|
409
|
+
*/
|
|
410
|
+
listConvos(st: StringTable): void
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Deletes the conversation by its `name`. If `name` equals `*` then all conversations are
|
|
414
|
+
* deleted.
|
|
415
|
+
*
|
|
416
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
417
|
+
* {@link Ai.lastErrorText}.
|
|
418
|
+
*/
|
|
419
|
+
deleteConvo(name: string): void
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* This method copies connection settings, including HTTP proxy, SOCKS proxy, network interface IP
|
|
423
|
+
* address, and other related settings from `sock`. It's optional; if not used, default settings
|
|
424
|
+
* apply. Call this method before sending REST API requests to an AI provider.
|
|
425
|
+
*
|
|
426
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
427
|
+
* {@link Ai.lastErrorText}.
|
|
428
|
+
*/
|
|
429
|
+
setConnectionSettings(sock: Socket): void
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Sends the current potentially multimodal input within the context of the selected conversation
|
|
433
|
+
* and receives the model's output. Prior to `v11.4.0` the `outputType` is limited to `text`.
|
|
434
|
+
* Starting in `v11.4.0`, the `outputType` can be set to `image` for AI providers that support
|
|
435
|
+
* conversational image output.
|
|
436
|
+
*
|
|
437
|
+
* Accumulated outputs are cleared on entry to this method. Accumulated inputs are cleared on the
|
|
438
|
+
* successful return of this method.
|
|
439
|
+
*
|
|
440
|
+
* This method cannot be called while a streaming Ask is in progress. In such a case the return
|
|
441
|
+
* value is `false` and nothing will occur.
|
|
442
|
+
*
|
|
443
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
444
|
+
* {@link Ai.askAsync}.
|
|
445
|
+
*
|
|
446
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
447
|
+
* {@link Ai.lastErrorText}.
|
|
448
|
+
*/
|
|
449
|
+
ask(outputType: string): void
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Asynchronous form of {@link Ai.ask}: the same call on a native worker thread,
|
|
453
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
454
|
+
* except {@link Ai.abort} (which cancels it) and the {@link Ai.onPercentDone} /
|
|
455
|
+
* {@link Ai.onProgressInfo} callbacks, which report progress while it runs.
|
|
456
|
+
*
|
|
457
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
458
|
+
* {@link Ai.lastErrorText}.
|
|
459
|
+
*/
|
|
460
|
+
askAsync(outputType: string): Promise<void>
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Provides details about the last method called on this object instance. While many methods do
|
|
464
|
+
* not generate information, some allow you to retrieve details by accessing the last JSON data
|
|
465
|
+
* immediately after the method call returns.
|
|
466
|
+
*
|
|
467
|
+
* Methods that produce last JSON information include: {@link Ai.getModels}.
|
|
468
|
+
*/
|
|
469
|
+
getLastJsonData(json: JsonObject): void
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Returns a list of models available to your account, such as `GPT-4o` and `GPT-5`. The models
|
|
473
|
+
* are listed in `st`, sorted in ascending, case-insensitive order. To access the raw JSON
|
|
474
|
+
* response after calling this method, use {@link Ai.getLastJsonData}.
|
|
475
|
+
*
|
|
476
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
477
|
+
* {@link Ai.getModelsAsync}.
|
|
478
|
+
*
|
|
479
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
480
|
+
* {@link Ai.lastErrorText}.
|
|
481
|
+
*/
|
|
482
|
+
getModels(st: StringTable): void
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Asynchronous form of {@link Ai.getModels}: the same call on a native worker thread,
|
|
486
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
487
|
+
* except {@link Ai.abort} (which cancels it) and the {@link Ai.onPercentDone} /
|
|
488
|
+
* {@link Ai.onProgressInfo} callbacks, which report progress while it runs.
|
|
489
|
+
*
|
|
490
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
491
|
+
* {@link Ai.lastErrorText}.
|
|
492
|
+
*/
|
|
493
|
+
getModelsAsync(st: StringTable): Promise<void>
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Adds text to the potentially multimodal input that will be sent in the next call to {@link
|
|
497
|
+
* Ai.ask}.
|
|
498
|
+
*
|
|
499
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
500
|
+
* {@link Ai.lastErrorText}.
|
|
501
|
+
*/
|
|
502
|
+
inputAddText(text: string): void
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Returns the text output from the last call to {@link Ai.ask}.
|
|
506
|
+
*
|
|
507
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
508
|
+
* {@link Ai.lastErrorText}.
|
|
509
|
+
*/
|
|
510
|
+
getOutputText(): string
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Returns the text output, appended to `sb`, from the last call to {@link Ai.ask}.
|
|
514
|
+
*
|
|
515
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
516
|
+
* {@link Ai.lastErrorText}.
|
|
517
|
+
*/
|
|
518
|
+
getOutputTextSb(sb: StringBuilder): void
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* Clears the inputs to be sent in the next call to {@link Ai.ask}.
|
|
522
|
+
*/
|
|
523
|
+
inputClear(): void
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Adds text to the potentially multimodal input that will be sent in the next call to {@link
|
|
527
|
+
* Ai.ask}.
|
|
528
|
+
*
|
|
529
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
530
|
+
* {@link Ai.lastErrorText}.
|
|
531
|
+
*/
|
|
532
|
+
inputAddTextSb(sb: StringBuilder): void
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Adds an image to the potentially multimodal input that will be sent in the next call to {@link
|
|
536
|
+
* Ai.ask}. The `bd` contains the images data. The image data must be jpeg, png, or webp format.
|
|
537
|
+
*
|
|
538
|
+
* If {@link Ai.fullTranscript} is _CKFALSE_, `summary` is sent in subsequent interactions instead
|
|
539
|
+
* of the image data. If {@link Ai.fullTranscript} is `true`, `summary` is not sent, and the image
|
|
540
|
+
* data is re-sent in each interaction.
|
|
541
|
+
*
|
|
542
|
+
* This method cannot be used with `DeepSeek`. DeepSeek does not appear to expose an
|
|
543
|
+
* OpenAI-compatible vision model (yet). You cannot send image URLs or image data to DeepSeek.
|
|
544
|
+
*
|
|
545
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
546
|
+
* {@link Ai.lastErrorText}.
|
|
547
|
+
*/
|
|
548
|
+
inputAddImageData(bd: BinData, summary: string): void
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* Adds an image located at a `url` to the potentially multimodal input that will be sent in the
|
|
552
|
+
* next call to {@link Ai.ask}.
|
|
553
|
+
*
|
|
554
|
+
* If {@link Ai.fullTranscript} is _CKFALSE_, `summary` is sent in subsequent interactions instead
|
|
555
|
+
* of the image URL. If {@link Ai.fullTranscript} is `true`, `summary` is not sent, and the image
|
|
556
|
+
* URL is re-sent in each interaction.
|
|
557
|
+
*
|
|
558
|
+
* This method cannot be used with `DeepSeek`. DeepSeek does not appear to expose an
|
|
559
|
+
* OpenAI-compatible vision model (yet). You cannot send image URLs or image data to DeepSeek.
|
|
560
|
+
*
|
|
561
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
562
|
+
* {@link Ai.lastErrorText}.
|
|
563
|
+
*/
|
|
564
|
+
inputAddImageUrl(url: string, summary: string): void
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Adds file data, such as a PDF, to the potentially multimodal input that will be sent in the
|
|
568
|
+
* next call to {@link Ai.ask}. The `bd` contains the file data.
|
|
569
|
+
*
|
|
570
|
+
* If {@link Ai.fullTranscript} is _CKFALSE_, `summary` is sent in subsequent interactions instead
|
|
571
|
+
* of the file data. If {@link Ai.fullTranscript} is `true`, `summary` is not sent, and the file
|
|
572
|
+
* data is re-sent in each interaction.
|
|
573
|
+
*
|
|
574
|
+
* This method cannot be used with `DeepSeek`.
|
|
575
|
+
*
|
|
576
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
577
|
+
* {@link Ai.lastErrorText}.
|
|
578
|
+
*/
|
|
579
|
+
inputAddFileData(filename: string, bd: BinData, summary: string): void
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Adds a file located at a `url` to the potentially multimodal input that will be sent in the
|
|
583
|
+
* next call to {@link Ai.ask}.
|
|
584
|
+
*
|
|
585
|
+
* If {@link Ai.fullTranscript} is _CKFALSE_, `summary` is sent in subsequent interactions instead
|
|
586
|
+
* of the file URL. If {@link Ai.fullTranscript} is `true`, `summary` is not sent, and the file
|
|
587
|
+
* URL is re-sent in each interaction.
|
|
588
|
+
*
|
|
589
|
+
* This method cannot be used with `DeepSeek`.
|
|
590
|
+
*
|
|
591
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
592
|
+
* {@link Ai.lastErrorText}.
|
|
593
|
+
*/
|
|
594
|
+
inputAddFileUrl(url: string, summary: string): void
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Returns immediately with one of the following values:
|
|
598
|
+
*
|
|
599
|
+
* `-1` - Error
|
|
600
|
+
*
|
|
601
|
+
* `0` - No streaming event updates are available.
|
|
602
|
+
*
|
|
603
|
+
* `1` - A streaming event updates is ready for retrieval via {@link Ai.nextAiEvent}
|
|
604
|
+
*
|
|
605
|
+
* `2` - The streaming AI response has already completed, or no streaming response is ongoing.
|
|
606
|
+
*
|
|
607
|
+
* If `abort` is `true`, then the streaming response is aborted and this method returns the value
|
|
608
|
+
* `2`. Applications should pass in `false` for `abort` to continue streaming.
|
|
609
|
+
*/
|
|
610
|
+
pollAi(abort: boolean): number
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Retrieves the next available AI streaming mode response update. Use the {@link Ai.pollAi}
|
|
614
|
+
* method to check if a response update is immediately accessible. The event name is returned in
|
|
615
|
+
* `sbName`. If the event name is `delta`, the text is returned in `sbDelta`.
|
|
616
|
+
*
|
|
617
|
+
* For the complete raw event JSON, use the {@link Ai.getLastJsonData} function. Note that the raw
|
|
618
|
+
* JSON format varies by AI provider.
|
|
619
|
+
*
|
|
620
|
+
* Each AI provider (e.g., OpenAI, Claude, xAI) sends a unique set of events. Some of these events
|
|
621
|
+
* mark the start and end of sections and content parts, while others do not. Chilkat standardizes
|
|
622
|
+
* these events and returns the following event types.
|
|
623
|
+
*
|
|
624
|
+
* - `response_created` — The server acknowledges the request and has created a response object.
|
|
625
|
+
*
|
|
626
|
+
* Nothing has been streamed yet — it’s just the signal that the response pipeline is open.
|
|
627
|
+
*
|
|
628
|
+
* - `empty` — Some AI providers send empty heartbeat / keep-alive updates to ensure the stream
|
|
629
|
+
* stays open and proxies don't time out.
|
|
630
|
+
*
|
|
631
|
+
* - `output_item_added` — A new output item has been added to the response. An “output item” is a
|
|
632
|
+
* top-level container — could be text, tool call, or other structured content.
|
|
633
|
+
*
|
|
634
|
+
* - `content_part_added` — Within the output item, the model starts a new content part.
|
|
635
|
+
*
|
|
636
|
+
* A content part is typically a segment of a specific type (e.g., text, JSON snippet, or image
|
|
637
|
+
* reference).
|
|
638
|
+
*
|
|
639
|
+
* - `delta` — These are the incremental text tokens being streamed.
|
|
640
|
+
*
|
|
641
|
+
* Each delta contains the next piece of text (like characters or words).
|
|
642
|
+
*
|
|
643
|
+
* You’ll see many of these in sequence while the model is generating.
|
|
644
|
+
*
|
|
645
|
+
* - `output_text_done` — Marks the end of the text streaming for that content part.
|
|
646
|
+
*
|
|
647
|
+
* No more deltas will arrive for this part.
|
|
648
|
+
*
|
|
649
|
+
* - `content_part_done` — Closes the current content part.
|
|
650
|
+
*
|
|
651
|
+
* Tells you the model is finished with that segment (e.g., done streaming a paragraph).
|
|
652
|
+
*
|
|
653
|
+
* - `output_item_done` — Closes the current output item entirely.
|
|
654
|
+
*
|
|
655
|
+
* Means that item is fully complete (all its parts are done).
|
|
656
|
+
*
|
|
657
|
+
* - `response_completed` — The entire response object is finished.
|
|
658
|
+
*
|
|
659
|
+
* No more items will be added, and the stream will soon close.
|
|
660
|
+
*
|
|
661
|
+
* - `null_terminator` — The stream is closed. All streaming responses end with a single
|
|
662
|
+
* null_terminator.
|
|
663
|
+
*
|
|
664
|
+
* - `function_call` — (starting in **v11.4.0**) The AI model is requesting a function call. This
|
|
665
|
+
* is for **manual tool calling**.
|
|
666
|
+
*
|
|
667
|
+
* - `js_function_call` — (starting in **v11.4.0**) The AI model is requesting a function call
|
|
668
|
+
* that Chilkat can execute automatically. Call {@link Ai.streamingJsToolCall} to run it. This
|
|
669
|
+
* covers both **JavaScript** tools ({@link Ai.registerJsTools}) and **MCP** tools ({@link
|
|
670
|
+
* Ai.useMcp}).
|
|
671
|
+
*
|
|
672
|
+
* - `web_search_call` — (starting in **v11.6.0**) The AI provider is performing a server-side web
|
|
673
|
+
* search while generating the response. This is an informational progress event (useful for
|
|
674
|
+
* showing a "Searching the web…" indicator); the application takes no action. The retrieved
|
|
675
|
+
* sources are available from {@link Ai.getSearchResults} after the response completes.
|
|
676
|
+
*
|
|
677
|
+
* `maxWaitMs` defines the maximum wait time to receive the complete event. For instance, if
|
|
678
|
+
* {@link Ai.pollAi} signals an available streaming update but only part of the event JSON has
|
|
679
|
+
* been received, the rest is probably on its way. In such cases, this method must wait to receive
|
|
680
|
+
* the entire JSON.
|
|
681
|
+
*
|
|
682
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
683
|
+
* {@link Ai.lastErrorText}.
|
|
684
|
+
*/
|
|
685
|
+
nextAiEvent(maxWaitMs: number, sbName: StringBuilder, sbDelta: StringBuilder): void
|
|
686
|
+
|
|
687
|
+
/**
|
|
688
|
+
* This method is provided for convenience. It causes the calling thread to sleep for a number of
|
|
689
|
+
* milliseconds.
|
|
690
|
+
*/
|
|
691
|
+
sleepMs(millisec: number): void
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Sets additional provider params needed for some pre-defined providers. As of this current
|
|
695
|
+
* version, the possible params are:
|
|
696
|
+
*
|
|
697
|
+
* - `azure.clientId`, a GUID/UUID such as 17280f2d-f709-4a7b-af1d-9928190e13cf
|
|
698
|
+
*
|
|
699
|
+
* - `azure.clientSecret`, such as UZc8Q~YBrRIgfe_zbAOwWV.8ikuHa3JJF7LvCdt.
|
|
700
|
+
*
|
|
701
|
+
* - `azure.tenantId`, a GUID/UUID such as aa4b5625-a31f-44dd-94ec-e2f6c0c64d2c
|
|
702
|
+
*
|
|
703
|
+
* - `azure.location`, such as `eastus`
|
|
704
|
+
*
|
|
705
|
+
* - `azure.subscription`, a GUID/UUID such as 4abd4bf6-5260-4795-90f6-1e91ce4f582c
|
|
706
|
+
*
|
|
707
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
708
|
+
* {@link Ai.lastErrorText}.
|
|
709
|
+
*/
|
|
710
|
+
setProviderParams(json: JsonObject): void
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Sets additional {@link Ai.ask} params such as:
|
|
714
|
+
*
|
|
715
|
+
* - `effort` (see below)
|
|
716
|
+
*
|
|
717
|
+
* - `max_output_tokens` (see below)
|
|
718
|
+
*
|
|
719
|
+
* - `max_tool_iterations` - `v11.4.0` Applies only to automatic JavaScript tool function calls.
|
|
720
|
+
* Sets a maximum number of AI model tool responses that can be received. The default is `5`.
|
|
721
|
+
* This is to prevent an unlikely and unexpected infinite cycle of AI model tool responses and
|
|
722
|
+
* automatic tool calling.
|
|
723
|
+
*
|
|
724
|
+
* - `temperature` (see below)
|
|
725
|
+
*
|
|
726
|
+
* - `web_search` - `v11.6.0` A JSON object that enables provider-hosted web search (also called
|
|
727
|
+
* "grounding") so the model can retrieve live results and answer with citations. See below.
|
|
728
|
+
*
|
|
729
|
+
* `verbose_ai_logging`- `v11.4.0` Adds even more detailed logging to the {@link
|
|
730
|
+
* Ai.lastErrorText}, more than what is added when the {@link Ai.verboseLogging} property is
|
|
731
|
+
* enabled.
|
|
732
|
+
*
|
|
733
|
+
* `effort`
|
|
734
|
+
*
|
|
735
|
+
* The `effort` can be set to `none`, `minimal`, `low`, `medium`, or `high`.
|
|
736
|
+
*
|
|
737
|
+
* Chilkat will automatically convert `"effort"` to the correct JSON member name and value based
|
|
738
|
+
* on the AI provider.
|
|
739
|
+
*
|
|
740
|
+
* API / Provider
|
|
741
|
+
* JSON Member for Effort
|
|
742
|
+
*
|
|
743
|
+
* | OpenAI Responses API |
|
|
744
|
+
* | `reasoning.effort` → `none|minimal|low|medium|high` |
|
|
745
|
+
*
|
|
746
|
+
* | Anthropic Claude |
|
|
747
|
+
* | `output_config.effort` → `low|medium|high` |
|
|
748
|
+
*
|
|
749
|
+
* | Google Gemini |
|
|
750
|
+
* | `generationConfig.thinkingConfig.thinkingLevel` → `LOW|HIGH` |
|
|
751
|
+
*
|
|
752
|
+
* | OpenAI Chat Completions |
|
|
753
|
+
* | `reasoning_effort` → `none|minimal|low|medium|high` |
|
|
754
|
+
*
|
|
755
|
+
* `max_output_tokens`
|
|
756
|
+
*
|
|
757
|
+
* Max output tokens simply limit how long the model’s response is allowed to be.
|
|
758
|
+
* It’s just a cap — the model may use fewer, but cannot exceed it.
|
|
759
|
+
*
|
|
760
|
+
* Chilkat will automatically convert `"max_output_tokens"` to the correct JSON member name based
|
|
761
|
+
* on the AI provider.
|
|
762
|
+
*
|
|
763
|
+
* API / Provider
|
|
764
|
+
* JSON Member for Max Tokens
|
|
765
|
+
*
|
|
766
|
+
* | OpenAI Responses API |
|
|
767
|
+
* | `max_output_tokens` |
|
|
768
|
+
*
|
|
769
|
+
* | Anthropic Claude |
|
|
770
|
+
* | `max_tokens` |
|
|
771
|
+
*
|
|
772
|
+
* | Google Gemini |
|
|
773
|
+
* | `generationConfig.maxOutputTokens` |
|
|
774
|
+
*
|
|
775
|
+
* | OpenAI Chat Completions |
|
|
776
|
+
* | `max_completion_tokens` |
|
|
777
|
+
*
|
|
778
|
+
* **Typical limits (approximate)**
|
|
779
|
+
*
|
|
780
|
+
* Different AI providers enforce different maximum \*output\* sizes:
|
|
781
|
+
*
|
|
782
|
+
* Provider / Model
|
|
783
|
+
* Typical Max Output Tokens
|
|
784
|
+
*
|
|
785
|
+
* | OpenAI GPT-4, GPT-4 Turbo |
|
|
786
|
+
* | ~4,096–8,192 tokens |
|
|
787
|
+
*
|
|
788
|
+
* | OpenAI GPT-5 / GPT-5.1 |
|
|
789
|
+
* | Often ~8,192–16,384 tokens (varies by deployment) |
|
|
790
|
+
*
|
|
791
|
+
* | OpenAI o-series (o1, o1-mini, o3) |
|
|
792
|
+
* | ~4,096–8,192 tokens |
|
|
793
|
+
*
|
|
794
|
+
* | Anthropic Claude 3 / 3.5 |
|
|
795
|
+
* | ~4,096 tokens (fixed; cannot request more) |
|
|
796
|
+
*
|
|
797
|
+
* | Google Gemini 1.5 |
|
|
798
|
+
* | ~8,192–16,384 tokens |
|
|
799
|
+
*
|
|
800
|
+
* | xAI Grok 1.5 |
|
|
801
|
+
* | ~2,048–4,096 tokens |
|
|
802
|
+
*
|
|
803
|
+
* | Ollama / local models |
|
|
804
|
+
* | Usually 1,024–4,096 depending on model size |
|
|
805
|
+
*
|
|
806
|
+
* `temperature`
|
|
807
|
+
*
|
|
808
|
+
* Most modern AI APIs (including OpenAI’s) allow a `temperature` range from 0.0 to 2.0. Chilkat
|
|
809
|
+
* will ignore and not send a `temperature` having a value outside this range.
|
|
810
|
+
*
|
|
811
|
+
* Here’s the breakdown:
|
|
812
|
+
*
|
|
813
|
+
* - **0.0 → 1.0:** Traditional range used by older models and most examples.
|
|
814
|
+
*
|
|
815
|
+
* - **\>1.0 up to 2.0:** Expands randomness even further. Outputs can become highly creative,
|
|
816
|
+
* unusual, or less controlled.
|
|
817
|
+
*
|
|
818
|
+
* **Practical guidance:**
|
|
819
|
+
*
|
|
820
|
+
* Temperature
|
|
821
|
+
* Behavior
|
|
822
|
+
*
|
|
823
|
+
* | **0.0** |
|
|
824
|
+
* | Fully deterministic. Same prompt → same answer. |
|
|
825
|
+
*
|
|
826
|
+
* | **0.1–0.5** |
|
|
827
|
+
* | Focused, safe, factual, ideal for coding and instructions. |
|
|
828
|
+
*
|
|
829
|
+
* | **0.6–1.0** |
|
|
830
|
+
* | Creative but still coherent. Great for writing or brainstorming. |
|
|
831
|
+
*
|
|
832
|
+
* | **1.1–2.0** |
|
|
833
|
+
* | Very creative, exploratory, sometimes chaotic; useful for idea generation or stylistic
|
|
834
|
+
* experimentation. |
|
|
835
|
+
*
|
|
836
|
+
* The valid range is technically 0.0 to 2.0, but the commonly useful range is usually 0.0 to ~1.2
|
|
837
|
+
* for most applications.
|
|
838
|
+
*
|
|
839
|
+
* `web_search` (starting in `v11.6.0`)
|
|
840
|
+
*
|
|
841
|
+
* The `web_search` param is a JSON object that turns on the AI provider's \*server-side\* web
|
|
842
|
+
* search tool. The provider performs the search while generating the response, and the model
|
|
843
|
+
* answers using the retrieved results. After the {@link Ai.ask}, the retrieved sources can be
|
|
844
|
+
* obtained by calling {@link Ai.getSearchResults}.
|
|
845
|
+
*
|
|
846
|
+
* Example:
|
|
847
|
+
*
|
|
848
|
+
* ```
|
|
849
|
+
* {
|
|
850
|
+
* "web_search": {
|
|
851
|
+
* "enabled": true,
|
|
852
|
+
* "max_uses": 3,
|
|
853
|
+
* "allowed_domains": [ "wikipedia.org", "nasa.gov" ],
|
|
854
|
+
* "blocked_domains": [ ],
|
|
855
|
+
* "recency": "week",
|
|
856
|
+
* "user_location": {
|
|
857
|
+
* "country": "US",
|
|
858
|
+
* "city": "Chicago",
|
|
859
|
+
* "region": "Illinois",
|
|
860
|
+
* "timezone": "America/Chicago"
|
|
861
|
+
* }
|
|
862
|
+
* }
|
|
863
|
+
* }
|
|
864
|
+
* ```
|
|
865
|
+
*
|
|
866
|
+
* Chilkat maps each field to the equivalent option for the selected {@link Ai.provider} and
|
|
867
|
+
* silently ignores fields the provider does not support. Only `enabled` is required; every other
|
|
868
|
+
* field is optional.
|
|
869
|
+
*
|
|
870
|
+
* - `enabled` — If `true`, web search is offered to the model for this {@link Ai.ask}. For
|
|
871
|
+
* `perplexity`, search is always on, so this is a no-op.
|
|
872
|
+
*
|
|
873
|
+
* - `max_uses` — The maximum number of searches the model may perform while answering. This is
|
|
874
|
+
* the primary cost-control knob (see the billing note below).
|
|
875
|
+
*
|
|
876
|
+
* - `allowed_domains` — An array of domains. When present, search results are restricted to these
|
|
877
|
+
* domains.
|
|
878
|
+
*
|
|
879
|
+
* - `blocked_domains` — An array of domains to exclude from results. Do not specify both
|
|
880
|
+
* `allowed_domains` and `blocked_domains` in the same request unless the provider permits it.
|
|
881
|
+
*
|
|
882
|
+
* - `recency` — Limits results by age. Possible values are `day`, `week`, `month`, or `year`.
|
|
883
|
+
*
|
|
884
|
+
* - `user_location` — An optional object with `country`, `city`, `region`, and `timezone` members
|
|
885
|
+
* used to localize results.
|
|
886
|
+
*
|
|
887
|
+
* **Provider support matrix**
|
|
888
|
+
*
|
|
889
|
+
* Field
|
|
890
|
+
* openai
|
|
891
|
+
* claude
|
|
892
|
+
* google
|
|
893
|
+
* xai
|
|
894
|
+
* perplexity
|
|
895
|
+
*
|
|
896
|
+
* | `enabled` |
|
|
897
|
+
* | web_search tool |
|
|
898
|
+
* | web_search tool |
|
|
899
|
+
* | google_search |
|
|
900
|
+
* | web_search tool |
|
|
901
|
+
* | always on |
|
|
902
|
+
*
|
|
903
|
+
* | `max_uses` |
|
|
904
|
+
* | — |
|
|
905
|
+
* | ✓ |
|
|
906
|
+
* | — |
|
|
907
|
+
* | — |
|
|
908
|
+
* | — |
|
|
909
|
+
*
|
|
910
|
+
* | `allowed_domains` |
|
|
911
|
+
* | ✓ |
|
|
912
|
+
* | ✓ |
|
|
913
|
+
* | — |
|
|
914
|
+
* | ✓ |
|
|
915
|
+
* | ✓ |
|
|
916
|
+
*
|
|
917
|
+
* | `blocked_domains` |
|
|
918
|
+
* | — |
|
|
919
|
+
* | ✓ |
|
|
920
|
+
* | — |
|
|
921
|
+
* | ✓ |
|
|
922
|
+
* | ✓ |
|
|
923
|
+
*
|
|
924
|
+
* | `recency` |
|
|
925
|
+
* | — |
|
|
926
|
+
* | — |
|
|
927
|
+
* | — |
|
|
928
|
+
* | — |
|
|
929
|
+
* | ✓ |
|
|
930
|
+
*
|
|
931
|
+
* | `user_location` |
|
|
932
|
+
* | ✓ |
|
|
933
|
+
* | ✓ |
|
|
934
|
+
* | — |
|
|
935
|
+
* | — |
|
|
936
|
+
* | — |
|
|
937
|
+
*
|
|
938
|
+
* **xAI (Grok):** Web search uses xAI's Agent Tools API on the Responses endpoint. Chilkat
|
|
939
|
+
* automatically routes a Grok web search request to that endpoint, so a web-search-capable Grok
|
|
940
|
+
* model (for example `grok-4.5`) is required. For Grok, only `allowed_domains` and
|
|
941
|
+
* `blocked_domains` (each limited to 5 domains, and mutually exclusive) are supported. xAI's
|
|
942
|
+
* older chat-completions "Live Search" is deprecated.
|
|
943
|
+
*
|
|
944
|
+
* **Not supported:** `deepseek` and `mistral` (chat) do not expose a web search tool. If
|
|
945
|
+
* `web_search` is set for these providers, the {@link Ai.ask} proceeds without search and a note
|
|
946
|
+
* is written to the {@link Ai.lastErrorText}. This keeps provider-switching code working when
|
|
947
|
+
* only the {@link Ai.provider} property changes.
|
|
948
|
+
*
|
|
949
|
+
* **Billing note:** Most providers bill web searches separately from tokens (typically per 1,000
|
|
950
|
+
* searches). Use `max_uses` where supported to bound per-request cost.
|
|
951
|
+
*
|
|
952
|
+
* **Streaming:** When {@link Ai.streaming} is enabled, a `web_search_call` event is delivered
|
|
953
|
+
* through {@link Ai.nextAiEvent} while the provider performs a search.
|
|
954
|
+
*
|
|
955
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
956
|
+
* {@link Ai.lastErrorText}.
|
|
957
|
+
*/
|
|
958
|
+
setAskParams(json: JsonObject): void
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Sets the tools JSON for AI requests.
|
|
962
|
+
*
|
|
963
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
964
|
+
* {@link Ai.lastErrorText}.
|
|
965
|
+
*/
|
|
966
|
+
registerManualTools(json: JsonObject): void
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* This method returns the function calls in `json` if the output contains any. Returns `true` if
|
|
970
|
+
* one or more function calls were returned, otherwise returns `false`. This only applies to
|
|
971
|
+
* manual function tool calling, not automatic JS tool calls.
|
|
972
|
+
*
|
|
973
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
974
|
+
* {@link Ai.lastErrorText}.
|
|
975
|
+
*/
|
|
976
|
+
getFunctionCalls(json: JsonObject): void
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* Returns the web search sources the model used in the most recent {@link Ai.ask}, if web search
|
|
980
|
+
* was enabled via the `web_search` param of {@link Ai.setAskParams}. Returns `true` if the last
|
|
981
|
+
* {@link Ai.ask} performed one or more web searches, in which case the normalized results are
|
|
982
|
+
* placed in `json`. Returns `false` if no web search occurred.
|
|
983
|
+
*
|
|
984
|
+
* Chilkat normalizes the differing citation formats of each AI provider into a single flat
|
|
985
|
+
* structure. `json` is populated as follows:
|
|
986
|
+
*
|
|
987
|
+
* ```
|
|
988
|
+
* {
|
|
989
|
+
* "search_results": [
|
|
990
|
+
* {
|
|
991
|
+
* "url": "https://example.com/article",
|
|
992
|
+
* "title": "Example Article Title",
|
|
993
|
+
* "snippet": "The relevant excerpt the model drew from...",
|
|
994
|
+
* "page_age": "2025-08-01"
|
|
995
|
+
* }
|
|
996
|
+
* ]
|
|
997
|
+
* }
|
|
998
|
+
* ```
|
|
999
|
+
*
|
|
1000
|
+
* The `snippet` and `page_age` members are populated only when the provider supplies them, and
|
|
1001
|
+
* may be absent otherwise. Each provider returns a different citation shape (for example, OpenAI
|
|
1002
|
+
* returns `url_citation` annotations with character offsets, Anthropic returns
|
|
1003
|
+
* `web_search_tool_result` content blocks, Google returns `groundingMetadata`, and Perplexity
|
|
1004
|
+
* returns a `search_results` array). The full, unmodified provider response — including any
|
|
1005
|
+
* character-offset annotations not represented in the normalized form — remains available via
|
|
1006
|
+
* {@link Ai.getLastJsonData}.
|
|
1007
|
+
*
|
|
1008
|
+
* **Streaming:** In streaming mode, a standardized `web_search_call` event is delivered through
|
|
1009
|
+
* {@link Ai.nextAiEvent} when the provider begins a search, and the normalized results are
|
|
1010
|
+
* available from this method after the `null_terminator` event completes the response.
|
|
1011
|
+
*
|
|
1012
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1013
|
+
* {@link Ai.lastErrorText}.
|
|
1014
|
+
*/
|
|
1015
|
+
getSearchResults(json: JsonObject): void
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Registers the tools provided by the connected MCP (Model Context Protocol) server `cMcp` so the
|
|
1019
|
+
* AI model can call them during a conversation. This lists the server's tools (a network
|
|
1020
|
+
* operation) and namespaces each tool name using the prefix in `namePrefix` (to avoid collisions
|
|
1021
|
+
* between servers and with JavaScript tools).
|
|
1022
|
+
*
|
|
1023
|
+
* When the model requests one of these tools, Chilkat automatically routes the call to the MCP
|
|
1024
|
+
* server via `Mcp.CallTool`, adds the result to the conversation, and continues the {@link
|
|
1025
|
+
* Ai.ask}. An informational `ProgressInfo` event named `McpToolCall` (value = the qualified tool
|
|
1026
|
+
* name) is emitted for each automatic call. MCP tools may be mixed with JavaScript tools ({@link
|
|
1027
|
+
* Ai.registerJsTools}) in the same conversation.
|
|
1028
|
+
*
|
|
1029
|
+
* The `cMcp` `Mcp` object must already be connected (see `Mcp.Connect`) and must remain valid for
|
|
1030
|
+
* as long as its tools are in use. Tool use requires a conversation; it cannot be used with a
|
|
1031
|
+
* stateless query.
|
|
1032
|
+
*
|
|
1033
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
1034
|
+
* {@link Ai.useMcpAsync}.
|
|
1035
|
+
*
|
|
1036
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1037
|
+
* {@link Ai.lastErrorText}.
|
|
1038
|
+
*/
|
|
1039
|
+
useMcp(cMcp: Mcp, namePrefix: string): void
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Asynchronous form of {@link Ai.useMcp}: the same call on a native worker thread,
|
|
1043
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
1044
|
+
* except {@link Ai.abort} (which cancels it) and the {@link Ai.onPercentDone} /
|
|
1045
|
+
* {@link Ai.onProgressInfo} callbacks, which report progress while it runs.
|
|
1046
|
+
*
|
|
1047
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
1048
|
+
* {@link Ai.lastErrorText}.
|
|
1049
|
+
*/
|
|
1050
|
+
useMcpAsync(cMcp: Mcp, namePrefix: string): Promise<void>
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Requests schema-constrained JSON output (structured output) for subsequent calls to {@link
|
|
1054
|
+
* Ai.ask}. `name` is a short schema name (letters, digits, underscores, and hyphens) used as an
|
|
1055
|
+
* identifier by some providers. `schema` is the desired output shape as a JSON Schema. `strict`
|
|
1056
|
+
* (strict) requests strict conformance where the provider supports it.
|
|
1057
|
+
*
|
|
1058
|
+
* Pass an empty string for `name` to clear a previously-set schema, which disables structured
|
|
1059
|
+
* output.
|
|
1060
|
+
*
|
|
1061
|
+
* When `strict` (strict) is `true`, Chilkat automatically augments the schema for the providers
|
|
1062
|
+
* that require it — adding `"additionalProperties": false` and marking every property `required`
|
|
1063
|
+
* on each object — so an ordinary JSON Schema can be supplied. For example, `schema` might be:
|
|
1064
|
+
*
|
|
1065
|
+
* ```
|
|
1066
|
+
* {
|
|
1067
|
+
* "type": "object",
|
|
1068
|
+
* "properties": {
|
|
1069
|
+
* "name": { "type": "string" },
|
|
1070
|
+
* "age": { "type": "integer" }
|
|
1071
|
+
* },
|
|
1072
|
+
* "required": ["name", "age"]
|
|
1073
|
+
* }
|
|
1074
|
+
* ```
|
|
1075
|
+
*
|
|
1076
|
+
* After {@link Ai.ask}, the model's JSON is available as text from {@link Ai.getOutputText} or
|
|
1077
|
+
* parsed from {@link Ai.getOutputJson}.
|
|
1078
|
+
*
|
|
1079
|
+
* **Provider support:** OpenAI, Anthropic Claude, Google Gemini, xAI Grok, Mistral, and
|
|
1080
|
+
* Perplexity return schema-conforming JSON. DeepSeek supports JSON-object mode only (a valid JSON
|
|
1081
|
+
* object is returned, but the schema is not enforced).
|
|
1082
|
+
*
|
|
1083
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1084
|
+
* {@link Ai.lastErrorText}.
|
|
1085
|
+
*/
|
|
1086
|
+
setOutputSchema(name: string, schema: JsonObject, strict: boolean): void
|
|
1087
|
+
|
|
1088
|
+
/**
|
|
1089
|
+
* Returns the model's structured JSON output from the most recent {@link Ai.ask}, parsed into
|
|
1090
|
+
* `json`. Use this after setting a schema with {@link Ai.setOutputSchema}. Returns `true` and
|
|
1091
|
+
* populates `json` when the output is valid JSON. Returns `false` if the model refused to produce
|
|
1092
|
+
* the output (in which case {@link Ai.lastResponseRefused} is `true` and {@link Ai.refusalText}
|
|
1093
|
+
* contains the explanation), if there is no output, or if the output is not valid JSON. The raw
|
|
1094
|
+
* JSON text is also available from {@link Ai.getOutputText}.
|
|
1095
|
+
*
|
|
1096
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1097
|
+
* {@link Ai.lastErrorText}.
|
|
1098
|
+
*/
|
|
1099
|
+
getOutputJson(json: JsonObject): void
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* Provide a function call result to the model. This only applies to `manual function tool
|
|
1103
|
+
* calling`, not automatic JS tool calls.
|
|
1104
|
+
*
|
|
1105
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1106
|
+
* {@link Ai.lastErrorText}.
|
|
1107
|
+
*/
|
|
1108
|
+
inputAddFnResult(callId: string, fnResult: string): void
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* Adds JavaScript tool functions to the AI. This function can be called multiple times to add
|
|
1112
|
+
* tool functions from multiple JavaScript sources. The JavaScript is passed in `sb`. If
|
|
1113
|
+
* `evalOnly` is `true`, then the `sb` contains JavaScript to be run for the purpose of adding
|
|
1114
|
+
* supporting functions and does not contain a `toolRegistry`.
|
|
1115
|
+
*
|
|
1116
|
+
* The `allowAllKeyword` indicates whether the `all` keyword is allowed in the `toolPermissions`.
|
|
1117
|
+
* If multiple JavaScript tool sources are loaded with several calls to RegisterJsTools, we may
|
|
1118
|
+
* not want one to clobber the permissions needed by another. The application can ensure this
|
|
1119
|
+
* doesn't happen by setting this property to `false`.
|
|
1120
|
+
*
|
|
1121
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1122
|
+
* {@link Ai.lastErrorText}.
|
|
1123
|
+
*/
|
|
1124
|
+
registerJsTools(sb: StringBuilder, evalOnly: boolean, allowAllKeyword: boolean): void
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Handles a `js_function_call` event within a streaming {@link Ai.ask} response loop by
|
|
1128
|
+
* automatically executing the requested tool and adding its result to the conversation. The tool
|
|
1129
|
+
* may be a JavaScript tool (registered with {@link Ai.registerJsTools}) or an MCP tool
|
|
1130
|
+
* (registered with {@link Ai.useMcp}).
|
|
1131
|
+
*
|
|
1132
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
1133
|
+
* {@link Ai.streamingJsToolCallAsync}.
|
|
1134
|
+
*
|
|
1135
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1136
|
+
* {@link Ai.lastErrorText}.
|
|
1137
|
+
*/
|
|
1138
|
+
streamingJsToolCall(sb: StringBuilder): void
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* Asynchronous form of {@link Ai.streamingJsToolCall}: the same call on a native worker thread,
|
|
1142
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
1143
|
+
* except {@link Ai.abort} (which cancels it) and the {@link Ai.onPercentDone} /
|
|
1144
|
+
* {@link Ai.onProgressInfo} callbacks, which report progress while it runs.
|
|
1145
|
+
*
|
|
1146
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
1147
|
+
* {@link Ai.lastErrorText}.
|
|
1148
|
+
*/
|
|
1149
|
+
streamingJsToolCallAsync(sb: StringBuilder): Promise<void>
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Adds a reference to a previously uploaded file. The `fileId` is the id returned from the
|
|
1153
|
+
* provider when originally uploading the file. The `mimeType`, such as "application/pdf",
|
|
1154
|
+
* "application/json", "text/xml", etc. is needed for some AI providers such as Google.
|
|
1155
|
+
*
|
|
1156
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1157
|
+
* {@link Ai.lastErrorText}.
|
|
1158
|
+
*/
|
|
1159
|
+
inputAddFileId(fileId: string, mimeType: string): void
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* Returns in `bd` the binary output from the last call to {@link Ai.ask}, such as for an AI
|
|
1163
|
+
* generated image.
|
|
1164
|
+
*
|
|
1165
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1166
|
+
* {@link Ai.lastErrorText}.
|
|
1167
|
+
*/
|
|
1168
|
+
getOutputBd(bd: BinData): void
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* Uploads a file and returns the file_id (or uri) that can be used to reference the pre-uploaded
|
|
1172
|
+
* file using InputAddFileId before an Ask. Files can be uploaded to the following providers:
|
|
1173
|
+
* openai, gemini, claude, and grok. The `mimeType` specifies the MIME type, such as
|
|
1174
|
+
* "application/pdf" or "text/plain". If `mimeType` is the emptys string, Chilkat will
|
|
1175
|
+
* automatically choose the MIME type based on the filename extension.
|
|
1176
|
+
*
|
|
1177
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
1178
|
+
* {@link Ai.uploadFileAsync}.
|
|
1179
|
+
*
|
|
1180
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1181
|
+
* {@link Ai.lastErrorText}.
|
|
1182
|
+
*/
|
|
1183
|
+
uploadFile(path: string, mimeType: string): string
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Asynchronous form of {@link Ai.uploadFile}: the same call on a native worker thread,
|
|
1187
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
1188
|
+
* except {@link Ai.abort} (which cancels it) and the {@link Ai.onPercentDone} /
|
|
1189
|
+
* {@link Ai.onProgressInfo} callbacks, which report progress while it runs.
|
|
1190
|
+
*
|
|
1191
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
1192
|
+
* {@link Ai.lastErrorText}.
|
|
1193
|
+
*/
|
|
1194
|
+
uploadFileAsync(path: string, mimeType: string): Promise<string>
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* Uploads the contents of `bd` and returns the file_id (or uri) that can be used to reference the
|
|
1198
|
+
* pre-uploaded file using InputAddFileId before an Ask. Files can be uploaded to the following
|
|
1199
|
+
* providers: openai, gemini, claude, and grok. The `filename` is mostly informational. The
|
|
1200
|
+
* `mimeType` specifies the MIME type, such as "application/pdf" or "text/plain". If `mimeType` is
|
|
1201
|
+
* the emptys string, Chilkat will automatically choose the MIME type based on the extension of
|
|
1202
|
+
* the filename passed in `filename`.
|
|
1203
|
+
*
|
|
1204
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
1205
|
+
* {@link Ai.uploadFileBdAsync}.
|
|
1206
|
+
*
|
|
1207
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1208
|
+
* {@link Ai.lastErrorText}.
|
|
1209
|
+
*/
|
|
1210
|
+
uploadFileBd(bd: BinData, filename: string, mimeType: string): string
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
* Asynchronous form of {@link Ai.uploadFileBd}: the same call on a native worker thread,
|
|
1214
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
1215
|
+
* except {@link Ai.abort} (which cancels it) and the {@link Ai.onPercentDone} /
|
|
1216
|
+
* {@link Ai.onProgressInfo} callbacks, which report progress while it runs.
|
|
1217
|
+
*
|
|
1218
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
1219
|
+
* {@link Ai.lastErrorText}.
|
|
1220
|
+
*/
|
|
1221
|
+
uploadFileBdAsync(bd: BinData, filename: string, mimeType: string): Promise<string>
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Uploads the contents of `sb` and returns the file_id (or uri) that can be used to reference the
|
|
1225
|
+
* pre-uploaded file using InputAddFileId before an Ask. Files can be uploaded to the following
|
|
1226
|
+
* providers: openai, gemini, claude, and grok. The `filename` is mostly informational. The
|
|
1227
|
+
* `mimeType` specifies the MIME type, such as "application/pdf" or "text/plain". If `mimeType` is
|
|
1228
|
+
* the emptys string, Chilkat will automatically choose the MIME type based on the extension of
|
|
1229
|
+
* the filename passed in `filename`. It is the utf-8 byte representation of the string that is
|
|
1230
|
+
* uploaded.
|
|
1231
|
+
*
|
|
1232
|
+
* This call blocks the JavaScript thread until Chilkat returns; from UI code prefer
|
|
1233
|
+
* {@link Ai.uploadFileSbAsync}.
|
|
1234
|
+
*
|
|
1235
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1236
|
+
* {@link Ai.lastErrorText}.
|
|
1237
|
+
*/
|
|
1238
|
+
uploadFileSb(sb: StringBuilder, filename: string, mimeType: string): string
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* Asynchronous form of {@link Ai.uploadFileSb}: the same call on a native worker thread,
|
|
1242
|
+
* settling on the JavaScript thread. While it is pending, other calls on this object throw,
|
|
1243
|
+
* except {@link Ai.abort} (which cancels it) and the {@link Ai.onPercentDone} /
|
|
1244
|
+
* {@link Ai.onProgressInfo} callbacks, which report progress while it runs.
|
|
1245
|
+
*
|
|
1246
|
+
* The promise rejects with an Error if the call fails; the full log is in
|
|
1247
|
+
* {@link Ai.lastErrorText}.
|
|
1248
|
+
*/
|
|
1249
|
+
uploadFileSbAsync(sb: StringBuilder, filename: string, mimeType: string): Promise<string>
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* Adds a reference to a previously uploaded image file. The `fileId` is the id returned from the
|
|
1253
|
+
* provider when originally uploading the file. The `mimeType`, such as "image/jpeg" is needed for
|
|
1254
|
+
* some AI providers such as Google.
|
|
1255
|
+
*
|
|
1256
|
+
* **Note:** At this time, only `OpenAI` and `Google` support the ability to upload once → get
|
|
1257
|
+
* file_id → reuse in later requests' workflow for images.
|
|
1258
|
+
*
|
|
1259
|
+
* @throws Error if the call fails (the message names the reason); the full log is in
|
|
1260
|
+
* {@link Ai.lastErrorText}.
|
|
1261
|
+
*/
|
|
1262
|
+
inputAddImageFileId(fileId: string, mimeType: string): void
|
|
1263
|
+
|
|
1264
|
+
// ---- Events (ReactNativeGen_DESIGN.md §6) ----
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* Called with the percent completed (0..100) while a long-running method runs, when Chilkat
|
|
1268
|
+
* can measure progress. Runs on the JavaScript thread, so it is only useful with the
|
|
1269
|
+
* `...Async` methods (during a synchronous call the thread is busy and the events arrive
|
|
1270
|
+
* after it returns). Assign `undefined` to remove.
|
|
1271
|
+
*/
|
|
1272
|
+
onPercentDone?: (pctDone: number) => void
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Called with a name/value pair of progress information while a long-running method runs
|
|
1276
|
+
* (what is reported depends on the class and method). Runs on the JavaScript thread; see
|
|
1277
|
+
* {@link Ai.onPercentDone}. Assign `undefined` to remove.
|
|
1278
|
+
*/
|
|
1279
|
+
onProgressInfo?: (name: string, value: string) => void
|
|
1280
|
+
|
|
1281
|
+
/**
|
|
1282
|
+
* Requests that the pending `...Async` call on this object stop at its next progress check.
|
|
1283
|
+
* The promise then rejects with Chilkat's abort error. Chilkat checks at least every
|
|
1284
|
+
* `heartbeatMs` milliseconds on the classes that have that property, so set it (e.g. 250)
|
|
1285
|
+
* for a responsive cancel. Harmless when nothing is pending.
|
|
1286
|
+
*/
|
|
1287
|
+
abort(): void
|
|
1288
|
+
}
|