![]()  | 
  
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
 
      (PowerBuilder) Full Transcript Mode vs Summarized Mode ConversationsSee more AI ExamplesWhen a conversation involves multimodal inputs, like images, files, or URLs, resending the full transcript can be costly. To address this, we send summary text instead of the previously sent data or URLs. This is the default approach. TheFullTranscript property can be set to 1 to full re-send the data or URL with the next request.Note: This example requires Chilkat v11.2.0 or greater. 
 integer li_rc integer li_Success oleobject loo_Ai string ls_SystemMsg string ls_DeveloperMsg string ls_ConversationName oleobject loo_Bd string ls_SummaryText oleobject loo_SbResponse li_Success = 0 // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loo_Ai = create oleobject li_rc = loo_Ai.ConnectToNewObject("Chilkat.Ai") if li_rc < 0 then destroy loo_Ai MessageBox("Error","Connecting to COM object failed") return end if // The provider can be "openai", "google", "claude", "deepseek", "xai", or "perplexity". // Support for additional providers will be added in future versions of Chilkat. // xAI (Grok) will be used here.. loo_Ai.Provider = "xai" // Use your provider's API key. loo_Ai.ApiKey = "MY_API_KEY" // Choose a model. loo_Ai.Model = "grok-4" // Create a new conversation to be maintained locally in memory. // If the conversation is the first to be created, it is also automatically selected. ls_SystemMsg = "You are a helpful assistant" ls_DeveloperMsg = "Respond only with markdown" ls_ConversationName = "test_conversation" loo_Ai.NewConvo(ls_ConversationName,ls_SystemMsg,ls_DeveloperMsg) // The FullTranscript property is set to 0 by default, enabling summary mode. // In this mode, for previously sent multimodal items, a summary message (e.g., "Previously uploaded image data") is sent instead of the actual data or URL. loo_Ai.FullTranscript = 0 // Add both text input and image data loo_Ai.InputAddText("Describe what you see in the following image.") loo_Bd = create oleobject li_rc = loo_Bd.ConnectToNewObject("Chilkat.BinData") // We're passing a relative local file path here.. (relative the the app's current working directory) li_Success = loo_Bd.LoadFile("qa_data/jpg/starfish.jpg") if li_Success = 0 then Write-Debug loo_Bd.LastErrorText destroy loo_Ai destroy loo_Bd return end if // The full image data is sent in this request because it is part of the current inputs. // In the followup request (below), the summary text is sent instead of the image data. // (But remember, the AI's response is part of the transcript, and it will also be sent. Therefore, // the transcript sent in the followup request will have information about what is contained in the image.) ls_SummaryText = "image previously uploaded." loo_Ai.InputAddImageData(loo_Bd,ls_SummaryText) // Ask the AI for text output. li_Success = loo_Ai.Ask("text") if li_Success = 0 then Write-Debug loo_Ai.LastErrorText destroy loo_Ai destroy loo_Bd return end if // Get the text response. loo_SbResponse = create oleobject li_rc = loo_SbResponse.ConnectToNewObject("Chilkat.StringBuilder") loo_Ai.GetOutputTextSb(loo_SbResponse) Write-Debug loo_SbResponse.GetAsString() // Sample output: // ### Image Description // // - **Subject**: A small, orange starfish (sea star) with five arms radiating from a central body. // - **Color**: Bright orange with subtle shading for texture. // - **Texture**: Bumpy or nodular surface, resembling the rough skin of a real starfish. // - **Position**: Viewed from above, slightly tilted, with one arm pointing upwards. // - **Background**: Plain white, making the starfish the focal point. // - **Style**: Appears to be a realistic illustration or photo, possibly a clipart or icon. // --------------------------- // Now let's send a followup question. The image data will not be included in what is sent because FullTranscript is 0. // However, the summary text and the AI assistant's previous answer IS sent. loo_Ai.InputAddText("How is this starfish different than a Brisingida?") li_Success = loo_Ai.Ask("text") if li_Success = 0 then Write-Debug loo_Ai.LastErrorText destroy loo_Ai destroy loo_Bd destroy loo_SbResponse return end if // Get the text response. loo_SbResponse.Clear() loo_Ai.GetOutputTextSb(loo_SbResponse) Write-Debug loo_SbResponse.GetAsString() // Sample output: // ### Differences Between the Described Starfish and Brisingida // // The starfish described in the image appears to be a typical shallow-water sea star (likely from the order Asteroida or similar), while Brisingida is a distinct order of deep-sea starfish. Here's a breakdown of key differences based on general characteristics: // // - **Number of Arms**: // - Described Starfish: 5 arms (standard for many common starfish like those in the Asterias genus). // - Brisingida: Typically 6 to 20 arms (often more than 5, with some species having up to 16 or more). // // - **Arm Structure and Flexibility**: // - Described Starfish: Shorter, stiffer arms with a bumpy, nodular texture; arms are broader and less flexible, suited for crawling on surfaces. // - Brisingida: Long, slender, highly flexible arms covered in spines; they resemble brittle stars and are adapted for suspension feeding by extending arms into water currents. // // - **Size and Body Shape**: // - Described Starfish: Small and compact, with a central disc and radiating arms; overall body is relatively flat and sturdy. // - Brisingida: Larger central disc with arms that can be very elongated (up to several times the disc's diameter); body is more delicate and adapted for deep-sea environments. // // - **Habitat and Lifestyle**: // - Described Starfish: Likely shallow coastal waters; active predators or scavengers that move across the seafloor. // - Brisingida: Deep-sea (abyssal) environments, often at depths of 1,000–5,000 meters; passive filter feeders that attach to substrates and capture plankton from currents. // // - **Color and Appearance**: // - Described Starfish: Bright orange, which is common in many shallow-water species for camouflage or warning. // - Brisingida: Often reddish, orange, or purplish, but with a more spiny, feathery look due to pedicellariae (tiny pincer-like structures) and spines. // // - **Regeneration and Reproduction**: // - Both can regenerate arms, but Brisingida may have more specialized adaptations for deep-sea survival, including asexual reproduction in some species. // // If the image represents a specific species (e.g., a common sea star like *Asterias rubens*), these differences would be even more pronounced. Brisingida are rarer and not commonly encountered outside scientific contexts. For precise identification, more details or a real photo would help! destroy loo_Ai destroy loo_Bd destroy loo_SbResponse  | 
  ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.