File tree 7 files changed +74
-13
lines changed
7 files changed +74
-13
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,10 @@ export class AttachmentManager {
335
335
}
336
336
337
337
if ( videoService . isVideoUrl ( attachment . url ) ) {
338
- const videoInfo = await videoService . processVideo ( attachment . url ) ;
338
+ const videoInfo = await videoService . processVideo (
339
+ attachment . url ,
340
+ this . runtime
341
+ ) ;
339
342
return {
340
343
id : attachment . id ,
341
344
url : attachment . url ,
Original file line number Diff line number Diff line change @@ -693,15 +693,18 @@ export class MessageManager {
693
693
if (
694
694
this . runtime
695
695
. getService < IVideoService > ( ServiceType . VIDEO )
696
- . isVideoUrl ( url )
696
+ ? .isVideoUrl ( url )
697
697
) {
698
698
const videoService = this . runtime . getService < IVideoService > (
699
699
ServiceType . VIDEO
700
700
) ;
701
701
if ( ! videoService ) {
702
702
throw new Error ( "Video service not found" ) ;
703
703
}
704
- const videoInfo = await videoService . processVideo ( url ) ;
704
+ const videoInfo = await videoService . processVideo (
705
+ url ,
706
+ this . runtime
707
+ ) ;
705
708
706
709
attachments . push ( {
707
710
id : `youtube-${ Date . now ( ) } ` ,
Original file line number Diff line number Diff line change @@ -485,7 +485,7 @@ export class VoiceManager extends EventEmitter {
485
485
486
486
const memory = {
487
487
id : stringToUuid (
488
- channelId + "-voice-message-" + Date . now ( )
488
+ roomId + "-voice-message-" + Date . now ( )
489
489
) ,
490
490
agentId : this . runtime . agentId ,
491
491
content : {
@@ -540,7 +540,11 @@ export class VoiceManager extends EventEmitter {
540
540
541
541
const responseMemory : Memory = {
542
542
id : stringToUuid (
543
- memory . id + "-voice-response-" + Date . now ( )
543
+ roomId +
544
+ "-" +
545
+ memory . id +
546
+ "-voice-response-" +
547
+ Date . now ( )
544
548
) ,
545
549
agentId : this . runtime . agentId ,
546
550
userId : this . runtime . agentId ,
Original file line number Diff line number Diff line change 55
55
"dependencies" : {
56
56
"@ai-sdk/anthropic" : " ^0.0.56" ,
57
57
"@ai-sdk/google" : " ^0.0.55" ,
58
- "@ai-sdk/google-vertex" : " ^0.0.42 " ,
58
+ "@ai-sdk/google-vertex" : " ^0.0.43 " ,
59
59
"@ai-sdk/groq" : " ^0.0.3" ,
60
- "@ai-sdk/openai" : " 1.0.0-canary.3 " ,
60
+ "@ai-sdk/openai" : " 1.0.4 " ,
61
61
"@ai16z/adapter-sqlite" : " workspace:*" ,
62
62
"@ai16z/adapter-sqljs" : " workspace:*" ,
63
63
"@ai16z/adapter-supabase" : " workspace:*" ,
Original file line number Diff line number Diff line change @@ -1028,7 +1028,6 @@ export interface ITranscriptionService extends Service {
1028
1028
1029
1029
export interface IVideoService extends Service {
1030
1030
isVideoUrl ( url : string ) : boolean ;
1031
- processVideo ( url : string ) : Promise < Media > ;
1032
1031
fetchVideoInfo ( url : string ) : Promise < Media > ;
1033
1032
downloadVideo ( videoInfo : Media ) : Promise < string > ;
1034
1033
processVideo ( url : string , runtime : IAgentRuntime ) : Promise < Media > ;
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ export class VideoService extends Service implements IVideoService {
93
93
94
94
public async processVideo (
95
95
url : string ,
96
- runtime ? : IAgentRuntime
96
+ runtime : IAgentRuntime
97
97
) : Promise < Media > {
98
98
this . queue . push ( url ) ;
99
99
this . processQueue ( runtime ) ;
You can’t perform that action at this time.
0 commit comments