mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-23 20:26:15 +00:00
Merge branch 'plugin_init' of https://github.com/csunny/DB-GPT into plugin_init
This commit is contained in:
commit
8721ea12c1
@ -101,15 +101,16 @@ def generate(prompt_request: PromptRequest):
|
|||||||
"stop": prompt_request.stop
|
"stop": prompt_request.stop
|
||||||
}
|
}
|
||||||
|
|
||||||
response = []
|
response = []
|
||||||
|
rsp_str = ""
|
||||||
output = generate_stream_gate(params)
|
output = generate_stream_gate(params)
|
||||||
for o in output:
|
for rsp in output:
|
||||||
print(o)
|
# rsp = rsp.decode("utf-8")
|
||||||
response.append(o)
|
rsp_str = str(rsp, "utf-8")
|
||||||
|
print("[TEST: output]:", rsp_str)
|
||||||
rsp = "".join(response)
|
response.append(rsp_str)
|
||||||
print("rsp:",rsp)
|
|
||||||
return {"response": rsp}
|
return {"response": rsp_str}
|
||||||
|
|
||||||
|
|
||||||
@app.post("/embedding")
|
@app.post("/embedding")
|
||||||
|
Loading…
Reference in New Issue
Block a user