Fixed multiline responses.
This commit is contained in:
parent
d7544c082f
commit
1e639383c2
2 changed files with 3 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
venv/
|
venv/
|
||||||
|
__pycache__
|
||||||
|
|
|
@ -29,8 +29,7 @@ class API:
|
||||||
response_data.append(line_raw["response"])
|
response_data.append(line_raw["response"])
|
||||||
|
|
||||||
final_response = "".join(response_data)
|
final_response = "".join(response_data)
|
||||||
generated_text = final_response.splitlines()[-1]
|
return final_response
|
||||||
return generated_text
|
|
||||||
else:
|
else:
|
||||||
return "Error: " + response.text
|
return "Error: " + response.text
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue