@our-llm/shared 3.0.0 → 3.0.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/package.json +1 -1
- package/types.ts +8 -0
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -100,6 +100,7 @@ export const NodeType = {
|
|
|
100
100
|
BILLING: 'billing',
|
|
101
101
|
LOADING: 'loading',
|
|
102
102
|
VIDEO_UNDERSTANDING: 'video_understanding',
|
|
103
|
+
AUDIO_TRANSCRIPTION: 'audio_transcription',
|
|
103
104
|
} as const
|
|
104
105
|
|
|
105
106
|
export type NodeType = (typeof NodeType)[keyof typeof NodeType]
|
|
@@ -214,6 +215,12 @@ export interface VideoUnderstandingNodeConfig extends NodeConfig {
|
|
|
214
215
|
script: string // JS 脚本,从 context 中获取视频 URL,返回 { videoUrl: string }
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
// 音频转文字节点配置
|
|
219
|
+
export interface AudioTranscriptionNodeConfig extends NodeConfig {
|
|
220
|
+
type: typeof NodeType.AUDIO_TRANSCRIPTION
|
|
221
|
+
script: string // JS代码片段,接收 context 参数(包含 variables、messages 和 audioTranscription 方法),返回对象用于更新 variables
|
|
222
|
+
}
|
|
223
|
+
|
|
217
224
|
// 联合类型:所有节点配置
|
|
218
225
|
export type AnyNodeConfig =
|
|
219
226
|
| StartNodeConfig
|
|
@@ -229,6 +236,7 @@ export type AnyNodeConfig =
|
|
|
229
236
|
| BillingNodeConfig
|
|
230
237
|
| LoadingNodeConfig
|
|
231
238
|
| VideoUnderstandingNodeConfig
|
|
239
|
+
| AudioTranscriptionNodeConfig
|
|
232
240
|
|
|
233
241
|
// 工作流边配置
|
|
234
242
|
export interface WorkflowEdge {
|