remove hardcoding of openai model

This commit is contained in:
Dave Horton
2024-12-19 18:42:57 -05:00
parent 17250f8386
commit d05e470867

View File

@@ -59,7 +59,7 @@ class TaskLlmOpenAI_S2S extends Task {
this.parent = parentTask; this.parent = parentTask;
this.vendor = this.parent.vendor; this.vendor = this.parent.vendor;
this.model = this.parent.model; this.model = this.parent.model || 'gpt-4o-realtime-preview-2024-12-17';
this.auth = this.parent.auth; this.auth = this.parent.auth;
this.connectionOptions = this.parent.connectOptions; this.connectionOptions = this.parent.connectOptions;
@@ -120,9 +120,9 @@ class TaskLlmOpenAI_S2S extends Task {
switch (this.vendor) { switch (this.vendor) {
case 'openai': case 'openai':
return 'v1/realtime?model=gpt-4o-realtime-preview-2024-10-01'; return 'v1/realtime?model=${this.model}';
case 'microsoft': case 'microsoft':
return 'openai/realtime?api-version=2024-10-01-preview&deployment=gpt-4o-realtime-preview-1001&'; return `openai/realtime?api-version=2024-10-01-preview&deployment=${this.model}`;
} }
} }