Elfe commited on
Commit
f70225f
1 Parent(s): 9138126
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -9,12 +9,9 @@ def callapi(p):
9
  try:
10
  response = openai.ChatCompletion.create(
11
  model="gpt-3.5-turbo",
12
- messages=forget_long_term(
13
- [
14
- {"role":"system", "content":content},
15
- {"role":"user", "content":p}
16
- ]
17
- )
18
  )
19
  display(response)
20
  response = response["choices"][0]["message"]["content"]
@@ -29,7 +26,7 @@ def callapi(p):
29
 
30
 
31
  def chat(p, qid, uid):
32
- return callapi(p)
33
 
34
  iface = gr.Interface(fn=chat,
35
  inputs=["text", "text", "text"],
 
9
  try:
10
  response = openai.ChatCompletion.create(
11
  model="gpt-3.5-turbo",
12
+ messages= [{"role":"system", "content":content},
13
+ {"role":"user", "content":p}
14
+ ]
 
 
 
15
  )
16
  display(response)
17
  response = response["choices"][0]["message"]["content"]
 
26
 
27
 
28
  def chat(p, qid, uid):
29
+ return ["text", callapi(p)]
30
 
31
  iface = gr.Interface(fn=chat,
32
  inputs=["text", "text", "text"],