AigcClient class

AIGC 客户端 - 统一管理与火山引擎API的交互

Constructors

AigcClient({required String baseUrl, required AigcConfig config})
构造函数

Properties

apiVersion String
API 版本
final
baseUrl String
服务器基础URL
final
config AigcConfig
final
hashCode int
The hash code for this object.
no setterinherited
messageHistory List<RtcAigcMessage>
消息历史
no setter
messageStream Stream<RtcAigcMessage>
消息流
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state AigcClientState
当前状态
no setter
stateStream Stream<AigcClientState>
状态流
no setter

Methods

cancelResponse() Future<bool>
取消AI响应(打断)
disconnect() Future<bool>
断开AIGC服务连接
dispose() → void
销毁资源
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage(String text) Future<bool>
发送消息给AI
startVoiceChat({String? businessId, String? welcomeMessage, bool isRetry = false}) Future<Map<String, dynamic>>
开始语音对话
stopVoiceChat() Future<Map<String, dynamic>>
停止语音对话
toString() String
A string representation of this object.
inherited
updateVoiceChat({required String Message}) Future<Map<String, dynamic>>
更新语音对话

Operators

operator ==(Object other) bool
The equality operator.
inherited