update
This commit is contained in:
@@ -17,7 +17,12 @@ public class GeminiTest : MonoBehaviour
|
||||
string testPrompt = "Chào bạn, nếu bạn nhận được tin nhắn này, hãy trả lời: 'Kết nối Gemini thành công!'";
|
||||
|
||||
GeminiService.Instance.GetResponse(testPersona, testPrompt, (response) => {
|
||||
Debug.Log($"<color=green>[Gemini Test] Phản hồi từ API:</color> {response}");
|
||||
string finalMsg = response;
|
||||
try {
|
||||
DialogueResult result = JsonUtility.FromJson<DialogueResult>(response);
|
||||
finalMsg = result.text;
|
||||
} catch { }
|
||||
Debug.Log($"<color=green>[Gemini Test] Phản hồi từ API:</color> {finalMsg}");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user