Skip to content

Commit

Permalink
chore: Refactor AI service to fix typo in downloaded variable name an…
Browse files Browse the repository at this point in the history
…d improve model loading status display
  • Loading branch information
fayeed committed Oct 4, 2024
1 parent 4e24ea8 commit a3ccd45
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions core/src/ai/AIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,15 @@ export class AIClient {
}
}));

const subscription = await this.#apolloClient.subscribe({
query: gql`
subscription AiTranscriptionText($streamId: String!) {
aiTranscriptionText(streamId: $streamId)
}
`,
variables: {
streamId: aiOpenTranscriptionStream
}
const subscription = this.#apolloClient.subscribe({
query: gql` subscription {
aiTranscriptionText(streamId: "${aiOpenTranscriptionStream}")
}`
}).subscribe({
next(data) {
streamCallback(data.data.transcriptionText);
streamCallback(data.data.aiTranscriptionText);

return data.data.transcriptionText;
return data.data.aiTranscriptionText;
},
error(err) {
console.error(err);
Expand Down

0 comments on commit a3ccd45

Please sign in to comment.