nhathuy07 commited on
Commit
996df88
·
verified ·
1 Parent(s): 75f5c1d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -198,7 +198,7 @@ async def __convert2md(inp):
198
  return await __convert_text(inp.encode(), "gfm-raw_html", "html")
199
 
200
  async def __convert2plain(inp):
201
- return await __convert_text(inp.encode(), "gfm-raw_html", "html")
202
 
203
  def convert2md(req):
204
  pass
@@ -627,7 +627,7 @@ async def llm_generate_text(request):
627
  try:
628
  repl = _r.json()['choices'][0]['message']['content']
629
  # input, type_out="plain", type_in="html"
630
- repl = await __convert_text(repl.encode(), "html-raw_html", "markdown")
631
  return PlainTextResponse(repl)
632
 
633
  except Exception as e:
 
198
  return await __convert_text(inp.encode(), "gfm-raw_html", "html")
199
 
200
  async def __convert2plain(inp):
201
+ return await __convert_text(inp.encode(), "plain", "html")
202
 
203
  def convert2md(req):
204
  pass
 
627
  try:
628
  repl = _r.json()['choices'][0]['message']['content']
629
  # input, type_out="plain", type_in="html"
630
+ repl = await __convert_text(repl.encode(), "html", "markdown")
631
  return PlainTextResponse(repl)
632
 
633
  except Exception as e: