Skip to content

Commit

Permalink
Complain about token first before question
Browse files Browse the repository at this point in the history
  • Loading branch information
mewim committed Dec 7, 2023
1 parent 954ec67 commit 6db5359
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ShellView/ShellCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ export default {
question = question.trim();
const token = this.settingsStore.gpt.apiToken;
const model = this.settingsStore.gpt.model;
if (!question) {
this.errorMessage = "The question cannot be empty. Please type a question and try again.";
}
if (!token) {
this.errorMessage = "OpenAI API token is not set. Please set the token in the settings and try again.";
}
if (!question) {
this.errorMessage = "The question cannot be empty. Please type a question and try again.";
}
if (this.errorMessage) {
this.$nextTick(() => {
this.$refs.resultContainer.handleDataChange(this.schema, null, this.errorMessage);
Expand Down

0 comments on commit 6db5359

Please sign in to comment.