Spaces:
Running
Running
Update GPT4KG.py
Browse files
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]
|