async getAnswer()

in src/app/chat/chat.component.ts [48:60]


  async getAnswer(prompt?: string) {
    this.prompt = prompt ?? this.question;
    this.addDialog(this.prompt);
    this.question = '';
    this.loading = true;

    await (
      await this.generativeLanguage.getAQAAnswer(this.prompt)
    ).subscribe(async (res) => {
      if (res.questions) this.followUpQuestions = res.questions;
      this.addDialog(res.answer, res.url, false);
    });
  }