helliun commited on
Commit
de3d112
1 Parent(s): b2c82cb

Update GPT4KG.py

Browse files
Files changed (1) hide show
  1. GPT4KG.py +1 -1
GPT4KG.py CHANGED
@@ -203,7 +203,7 @@ class KnowledgeGraph:
203
  system = {"role":"system","content":"You are a helpful chatbot that only outputs YES or NO"}
204
  messages = [system]
205
  messages.append({"role":"user","content":f"Do these two facts in our database express the same thing?: {pair}"})
206
- output = openai.ChatCompletion.create(model="gpt-4",messages=messages)["choices"][0]["message"].to_dict()["content"]
207
  if "yes" in output.lower():
208
  bad_index = facts.index(pair[1])
209
  redundant = rels[bad_index]
 
203
  system = {"role":"system","content":"You are a helpful chatbot that only outputs YES or NO"}
204
  messages = [system]
205
  messages.append({"role":"user","content":f"Do these two facts in our database express the same thing?: {pair}"})
206
+ output = openai.ChatCompletion.create(model="gpt-4-1106-preview",messages=messages)["choices"][0]["message"].to_dict()["content"]
207
  if "yes" in output.lower():
208
  bad_index = facts.index(pair[1])
209
  redundant = rels[bad_index]