Skip to content

Commit

Permalink
rembember openai chat voice and model in preference
Browse files Browse the repository at this point in the history
SQUASHED: AUTO-COMMIT-src-components-tools-openai-audio-chat.js,
  • Loading branch information
JensLincke committed May 29, 2024
1 parent 8e954fe commit d9586a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/tools/openai-audio-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ export default class OpenaiAudioChat extends Morph {
// }
]
}

this.voiceBox.value = lively.preferences.get("openai-audio-chat-voice") || this.voiceBox.value
this.voiceBox.addEventListener("change",
() => lively.preferences.set("openai-audio-chat-voice", this.voiceBox.value))

this.modelBox.value = lively.preferences.get("openai-audio-chat-model") || this.modelBox.value
this.modelBox.addEventListener("change",
() => lively.preferences.set("openai-audio-chat-model", this.modelBox.value))

this.setupUI()
await this.renderConversation()
lively.ensureID(this)
Expand Down

0 comments on commit d9586a2

Please sign in to comment.