Skip to content

Commit a0b3f4b

Browse files
Merge branch 'main' of https://github.com/ai16z/eliza
2 parents 38aeab1 + cb1b11f commit a0b3f4b

File tree

7 files changed

+74
-13
lines changed

7 files changed

+74
-13
lines changed

packages/client-discord/src/attachments.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,10 @@ export class AttachmentManager {
335335
}
336336

337337
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+
);
339342
return {
340343
id: attachment.id,
341344
url: attachment.url,

packages/client-discord/src/messages.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -693,15 +693,18 @@ export class MessageManager {
693693
if (
694694
this.runtime
695695
.getService<IVideoService>(ServiceType.VIDEO)
696-
.isVideoUrl(url)
696+
?.isVideoUrl(url)
697697
) {
698698
const videoService = this.runtime.getService<IVideoService>(
699699
ServiceType.VIDEO
700700
);
701701
if (!videoService) {
702702
throw new Error("Video service not found");
703703
}
704-
const videoInfo = await videoService.processVideo(url);
704+
const videoInfo = await videoService.processVideo(
705+
url,
706+
this.runtime
707+
);
705708

706709
attachments.push({
707710
id: `youtube-${Date.now()}`,

packages/client-discord/src/voice.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ export class VoiceManager extends EventEmitter {
485485

486486
const memory = {
487487
id: stringToUuid(
488-
channelId + "-voice-message-" + Date.now()
488+
roomId + "-voice-message-" + Date.now()
489489
),
490490
agentId: this.runtime.agentId,
491491
content: {
@@ -540,7 +540,11 @@ export class VoiceManager extends EventEmitter {
540540

541541
const responseMemory: Memory = {
542542
id: stringToUuid(
543-
memory.id + "-voice-response-" + Date.now()
543+
roomId +
544+
"-" +
545+
memory.id +
546+
"-voice-response-" +
547+
Date.now()
544548
),
545549
agentId: this.runtime.agentId,
546550
userId: this.runtime.agentId,

packages/core/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
"dependencies": {
5656
"@ai-sdk/anthropic": "^0.0.56",
5757
"@ai-sdk/google": "^0.0.55",
58-
"@ai-sdk/google-vertex": "^0.0.42",
58+
"@ai-sdk/google-vertex": "^0.0.43",
5959
"@ai-sdk/groq": "^0.0.3",
60-
"@ai-sdk/openai": "1.0.0-canary.3",
60+
"@ai-sdk/openai": "1.0.4",
6161
"@ai16z/adapter-sqlite": "workspace:*",
6262
"@ai16z/adapter-sqljs": "workspace:*",
6363
"@ai16z/adapter-supabase": "workspace:*",

packages/core/src/types.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,6 @@ export interface ITranscriptionService extends Service {
10281028

10291029
export interface IVideoService extends Service {
10301030
isVideoUrl(url: string): boolean;
1031-
processVideo(url: string): Promise<Media>;
10321031
fetchVideoInfo(url: string): Promise<Media>;
10331032
downloadVideo(videoInfo: Media): Promise<string>;
10341033
processVideo(url: string, runtime: IAgentRuntime): Promise<Media>;

packages/plugin-node/src/services/video.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class VideoService extends Service implements IVideoService {
9393

9494
public async processVideo(
9595
url: string,
96-
runtime?: IAgentRuntime
96+
runtime: IAgentRuntime
9797
): Promise<Media> {
9898
this.queue.push(url);
9999
this.processQueue(runtime);

pnpm-lock.yaml

+56-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)