Fixed multiline responses.

This commit is contained in:
Patrick_Pluto 2024-09-16 12:17:06 +02:00
parent d7544c082f
commit 1e639383c2
2 changed files with 3 additions and 3 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
venv/ venv/
__pycache__

View file

@ -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