File tree 4 files changed +10
-5
lines changed
4 files changed +10
-5
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 @@ -1033,7 +1033,6 @@ export interface ITranscriptionService extends Service {
1033
1033
1034
1034
export interface IVideoService extends Service {
1035
1035
isVideoUrl ( url : string ) : boolean ;
1036
- processVideo ( url : string ) : Promise < Media > ;
1037
1036
fetchVideoInfo ( url : string ) : Promise < Media > ;
1038
1037
downloadVideo ( videoInfo : Media ) : Promise < string > ;
1039
1038
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