@ray-js/t-agent-ui-ray 0.2.5-beta-6 → 0.2.5
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/README-zh_CN.md +0 -5
- package/README.md +0 -5
- package/package.json +2 -2
package/README-zh_CN.md
CHANGED
|
@@ -69,7 +69,6 @@ const createAgent = () => {
|
|
|
69
69
|
withUI(), // 第一个插件 withUI 插件提供了一些默认的 UI 行为,必选
|
|
70
70
|
withAIStream({
|
|
71
71
|
// withAIStream 插件对接小程序 AI 智能体平台,在小程序中必选
|
|
72
|
-
enableTts: false, // 是否开启语音合成
|
|
73
72
|
earlyStart: true, // 是否在 onAgentStart 阶段就建立连接
|
|
74
73
|
agentId: '', // 输入你的智能体ID
|
|
75
74
|
}),
|
|
@@ -748,7 +747,6 @@ const createAgent = () => {
|
|
|
748
747
|
withUI(), // 一般都需要应用 withUI 插件
|
|
749
748
|
withAIStream({
|
|
750
749
|
agentId: 'your-agent-id', // 输入你的智能体ID
|
|
751
|
-
enableTts: false, // 是否开启语音合成,默认为 false
|
|
752
750
|
}),
|
|
753
751
|
withBuildIn()
|
|
754
752
|
);
|
|
@@ -768,7 +766,6 @@ const createAgent = () => {
|
|
|
768
766
|
- `agentId` 智能体 ID(必填)
|
|
769
767
|
- `clientType` 客户端类型,默认为 APP (2)
|
|
770
768
|
- `deviceId` 设备 ID,当 clientType 为 DEVICE (1) 时必填
|
|
771
|
-
- `enableTts` 是否开启语音合成,默认为 false
|
|
772
769
|
- `wireInput` 是否将输入块传递给智能体,默认为 true,设置为 false 时,需要你自己编写 onInputBlocksPush Hook 来处理输入块
|
|
773
770
|
- `historySize` 历史消息大小,默认为 1000
|
|
774
771
|
- `indexId` 索引 ID,默认为 'default'
|
|
@@ -976,7 +973,6 @@ export interface SendBlocksToAIStreamParams {
|
|
|
976
973
|
session: AIStreamSession;
|
|
977
974
|
attribute?: AIStreamChatAttribute;
|
|
978
975
|
signal?: AbortSignal;
|
|
979
|
-
enableTts?: boolean;
|
|
980
976
|
}
|
|
981
977
|
|
|
982
978
|
export function sendBlocksToAIStream(params: SendBlocksToAIStreamParams): {
|
|
@@ -1714,7 +1710,6 @@ const renderOptions = {
|
|
|
1714
1710
|
### @ray-js/t-agent-plugin-aistream
|
|
1715
1711
|
|
|
1716
1712
|
- **全新插件**:替代废弃的 assistant 插件,提供更强大的功能
|
|
1717
|
-
- **语音合成**:支持 TTS 功能,通过 `enableTts` 参数控制
|
|
1718
1713
|
- **连接优化**:新增 `earlyStart` 参数,支持提前建立连接,减少首次响应时间
|
|
1719
1714
|
- **Token 管理**:优化 Token 获取机制,支持自定义 `tokenOptions`
|
|
1720
1715
|
- **语音识别**:新增 AsrAgent 语音识别功能,支持实时语音转文字
|
package/README.md
CHANGED
|
@@ -69,7 +69,6 @@ const createAgent = () => {
|
|
|
69
69
|
withUI(), // The withUI plugin provides default UI behavior, essential
|
|
70
70
|
withAIStream({
|
|
71
71
|
// Connects to the mini-program AI agent platform, essential in mini-program
|
|
72
|
-
enableTts: false, // Whether to enable Text-to-Speech
|
|
73
72
|
earlyStart: true, // Whether to establish connection during onAgentStart phase
|
|
74
73
|
agentId: '', // Enter your agent ID
|
|
75
74
|
}),
|
|
@@ -741,7 +740,6 @@ const createAgent = () => {
|
|
|
741
740
|
const agent = createChatAgent(
|
|
742
741
|
withUI(), // Typically, the withUI plugin is necessary
|
|
743
742
|
withAIStream({
|
|
744
|
-
enableTts: false, // Enable Text-to-Speech
|
|
745
743
|
earlyStart: true, // Establish connection during onAgentStart phase
|
|
746
744
|
agentId: 'your-agent-id', // Provide your agent ID
|
|
747
745
|
}),
|
|
@@ -763,7 +761,6 @@ Parameters:
|
|
|
763
761
|
- `agentId` Agent ID (required)
|
|
764
762
|
- `clientType` Client type, defaults to APP (2)
|
|
765
763
|
- `deviceId` Device ID, required when clientType is DEVICE (1)
|
|
766
|
-
- `enableTts` Whether to enable Text-to-Speech, defaults to false
|
|
767
764
|
- `wireInput` Whether to pass input blocks to the agent, defaults to true. Set to false if you plan to handle input blocks manually with the onInputBlocksPush Hook
|
|
768
765
|
- `historySize` History message size, defaults to 1000
|
|
769
766
|
- `indexId` Index ID, defaults to 'default'
|
|
@@ -971,7 +968,6 @@ export interface SendBlocksToAIStreamParams {
|
|
|
971
968
|
session: AIStreamSession;
|
|
972
969
|
attribute?: AIStreamChatAttribute;
|
|
973
970
|
signal?: AbortSignal;
|
|
974
|
-
enableTts?: boolean;
|
|
975
971
|
}
|
|
976
972
|
|
|
977
973
|
export function sendBlocksToAIStream(params: SendBlocksToAIStreamParams): {
|
|
@@ -1752,7 +1748,6 @@ Below are the built-in multilingual keys:
|
|
|
1752
1748
|
### @ray-js/t-agent-plugin-aistream
|
|
1753
1749
|
|
|
1754
1750
|
- **New Plugin**: Replaces the deprecated assistant plugin, providing more powerful functionality
|
|
1755
|
-
- **Text-to-Speech**: Supports TTS functionality, controlled via `enableTts` parameter
|
|
1756
1751
|
- **Connection Optimization**: Added `earlyStart` parameter, supporting early connection establishment to reduce first response time
|
|
1757
1752
|
- **Token Management**: Optimized Token acquisition mechanism, supporting custom `tokenOptions`
|
|
1758
1753
|
- **Speech Recognition**: Added AsrAgent speech recognition functionality, supporting real-time speech-to-text
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/t-agent-ui-ray",
|
|
3
|
-
"version": "0.2.5
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"author": "Tuya.inc",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@types/echarts": "^4.9.22",
|
|
41
41
|
"@types/markdown-it": "^14.1.1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "5c2ee8c15695fa858e00d9f58147487479ca0121"
|
|
44
44
|
}
|