aymanemalih commited on
Commit
8c53e43
·
1 Parent(s): 2ad7977

Update gpt.py

Browse files
Files changed (1) hide show
  1. gpt.py +3 -4
gpt.py CHANGED
@@ -40,10 +40,9 @@ def get_keywords(question):
40
  function_call={"name": "list_keywords", "arguments": ["list"]},
41
  )
42
 
43
- arguments = response["choices"][0]["message"]["function_call"]["arguments"].lower()
44
- keywords = json.loads(arguments)["list"]
45
-
46
- return " ".join(keywords).split(" ")
47
 
48
 
49
  def answer_question(chunk, question):
 
40
  function_call={"name": "list_keywords", "arguments": ["list"]},
41
  )
42
 
43
+ arguments = response["choices"][0].text
44
+ print(arguments)
45
+ return " ".join(arguments).split(" ")
 
46
 
47
 
48
  def answer_question(chunk, question):