From c82ba43de2df42791bd7fc15b2b4ef9f2ec728f8 Mon Sep 17 00:00:00 2001 From: vsakkas Date: Fri, 17 Nov 2023 20:29:08 +0200 Subject: [PATCH] Improve compatibilty of request arguments --- bard/bard.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/bard/bard.py b/bard/bard.py index bd59752..07de171 100644 --- a/bard/bard.py +++ b/bard/bard.py @@ -60,9 +60,25 @@ def _build_ask_parameters(self) -> dict: def _build_ask_arguments(self, prompt: str) -> dict: request_data = [ - [prompt], + [prompt, 0, None, [], None, None, 0], + [""], # TODO: Support language codes, like "en" + [ + self.conversation_id if self.conversation_id else "", + "", + "", + self.response_id if self.response_id else None, + self.choice_id if self.choice_id else None, + [], + ], + "", # TODO: Find what this is + "", # TODO: Find what this is None, - [self.conversation_id, self.response_id, self.choice_id], + [1], + 1, + [], + [], + 1, + 0, ] return {