pabloce commited on
Commit
a257051
·
verified ·
1 Parent(s): 189ce5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -45,7 +45,8 @@ def respond(
45
  outputs = ""
46
  for output in stream:
47
  print(output)
48
- outputs += output["choices"][0]["delta"]
 
49
  yield outputs
50
  # from llama_cpp import Llama
51
  # from llama_cpp_agent import LlamaCppAgent
 
45
  outputs = ""
46
  for output in stream:
47
  print(output)
48
+ if "content" in output["choices"][0]["delta"]
49
+ outputs += output["choices"][0]["delta"]["content"]
50
  yield outputs
51
  # from llama_cpp import Llama
52
  # from llama_cpp_agent import LlamaCppAgent