Пример #1
0
 void SelectData(QASet qa)
 {
     sentenceLabel.text = qa.content;
     templetesDropdown.ClearOptions();
     templetesDropdown.AddOptions(qa.questions.ToList());
     questionInput.text = "";
 }
Пример #2
0
    void Invoke(QASet qa, string question)
    {
        Debug.Log($"questions: {question}");
        var answers = bert.Invoke(question, qa.content);

        if (answers.Length == 0)
        {
            Debug.LogError("Answer Not Found!");
            return;
        }
        for (int i = 0; i < answers.Length; i++)
        {
            Debug.Log($"Answer {i}: {answers[i]}");
        }

        sentenceLabel.text = GenerateHighlightedText(qa.content, answers.First());
    }