AI Assistant UI BizBundle

Last Updated on : 2025-04-14 06:15:40download

Overview

AI Assistant UI BizBundle provides capabilities related to AI assistant voice recognition, content generation, and command execution.

Integration

Version requirement: v6.0.0 or later.

Add the components of this UI BizBundle to the Podfile and run the command pod update.

source 'https://github.com/tuya/tuya-pod-specs.git'
source "https://github.com/TuyaInc/TuyaPublicSpecs.git"
source 'https://github.com/CocoaPods/Specs.git'

target 'your_target_name' do
  # Depends on the AI ​​Assistant UI BizBundle
  pod "ThingSmartAIAssistantBizBundle"
  # Depends on the Panel BizBundle
  pod 'ThingSmartPanelBizBundle'
end

Things to note

To use the voice recognition feature, you need to set NSMicrophoneUsageDescription in info.plist.

<key>NSMicrophoneUsageDescription</key>
<string>Chat with AI</string>

Usage

  1. Generate an AI assistant miniapp. For more information on how to create an agent, see AI Agent Dev Platform.

  2. Open the AI assistant miniapp.

    import ThingModuleManager
    
    func gotoAIAssistant() {
        let link: String = "your ai assistant miniapp url"
        let impl = ThingSmartBizCore.sharedInstance().service(of: ThingModuleRouteBlueprint.self)
        let _ = (impl as AnyObject).openRoute(link, withParams: nil)
    }
    

    To get the miniapp URL, you must manually parse the commissioning QR code and remove the tuyaSmart– prefix from the URL. For more information about the QR code, see AI Agent Dev Platform.