Add perfect answers to speaking

This commit is contained in:
Cristiano Ferreira
2023-12-05 21:43:19 +00:00
parent 57d6e7ffde
commit 50c39e5f9c
2 changed files with 71 additions and 18 deletions

View File

@@ -132,7 +132,7 @@ def make_openai_instruct_call(model, message: str, token_count, fields_to_check,
)["choices"][0]["text"]
if fields_to_check is None:
return response
return response.replace("\n\n", " ").strip()
processed_response = process_response(response, fields_to_check[0])
if check_fields(processed_response, fields_to_check) is False and try_count < TRY_LIMIT: