Improve correction to not add anything to the answer.
This commit is contained in:
@@ -250,14 +250,16 @@ def extract_existing_sections_from_body(my_dict, keys_to_extract):
|
||||
|
||||
|
||||
def get_fixed_text(text):
|
||||
message = ('Fix the errors in the given text and put it in a JSON. Sample JSON: {"fixed_text": "fixed test with no '
|
||||
message = ('Fix the errors in the given text and put it in a JSON. Do not complete the answer, only replace what '
|
||||
'is wrong. Sample JSON: {"fixed_text": "fixed test with no '
|
||||
'misspelling errors"}] \n The text: "' + text + '"')
|
||||
token_count = count_tokens(message)["n_tokens"]
|
||||
response = make_openai_instruct_call(GPT_3_5_TURBO_INSTRUCT, message, token_count, ["fixed_text"], 0.2)
|
||||
return response["fixed_text"]
|
||||
|
||||
def get_speaking_corrections(text):
|
||||
message = ('Fix the errors in the provided transcription and put it in a JSON. Sample JSON: {"fixed_text": "fixed '
|
||||
message = ('Fix the errors in the provided transcription and put it in a JSON. Do not complete the answer, only '
|
||||
'replace what is wrong. Sample JSON: {"fixed_text": "fixed '
|
||||
'transcription with no misspelling errors"}] \n The text: "' + text + '"')
|
||||
token_count = count_tokens(message)["n_tokens"]
|
||||
response = make_openai_instruct_call(GPT_3_5_TURBO_INSTRUCT, message, token_count, ["fixed_text"], 0.2)
|
||||
|
||||
Reference in New Issue
Block a user