CoruNethron commited on
Commit
8f23a29
·
verified ·
1 Parent(s): 7c68703

Update olapp.py

Browse files
Files changed (1) hide show
  1. olapp.py +2 -2
olapp.py CHANGED
@@ -15,10 +15,10 @@ class OlHandler(BaseHTTPRequestHandler):
15
  def do_GET(self):
16
  query = urlparse(self.path).query
17
  query_components = dict(qc.split("=") for qc in query.split("&"))
18
- q = query_components["q"]
19
 
20
  output = llm.create_completion(
21
- q,
22
  max_tokens=32,
23
  echo=False
24
  )["choices"][0]["text"]
 
15
  def do_GET(self):
16
  query = urlparse(self.path).query
17
  query_components = dict(qc.split("=") for qc in query.split("&"))
18
+ q = urllib.parse.unquote_plus(query_components["q"])
19
 
20
  output = llm.create_completion(
21
+ q.encode('utf-8'),
22
  max_tokens=32,
23
  echo=False
24
  )["choices"][0]["text"]