Feature Request: An option to parse escaped characters from LLM output. #84

Open
opened 2024-06-27 12:44:01 -04:00 by sigmareaver · 1 comment
sigmareaver commented 2024-06-27 12:44:01 -04:00 (Migrated from github.com)

I'm testing with a Llama 3 derivative, and disclaimer, I haven't yet modified the LlamaTale prompt to follow Llama 3 formatting, but some of the generated output I got from Llama 3 contained \r\n and I think it would be nice to have a config option for handling escaped characters, with perhaps 3 settings:

  1. Off
  2. Ignore/Discard
  3. Convert escape sequences to char (or whatever the standard is)
I'm testing with a Llama 3 derivative, and disclaimer, I haven't yet modified the LlamaTale prompt to follow Llama 3 formatting, but some of the generated output I got from Llama 3 contained `\r\n` and I think it would be nice to have a config option for handling escaped characters, with perhaps 3 settings: 1. Off 2. Ignore/Discard 3. Convert escape sequences to char (or whatever the standard is)
sigmareaver commented 2024-06-27 14:37:11 -04:00 (Migrated from github.com)

For what it's worth, I don't believe \r should show up without \n, but \n can show up without \r, so a simple substitution of:
"\\r" = "" and "\\n" = '\n' should work. Forgive my psuedo-code. I know how I'd write this in C, but I'm not very familiar with Python.

For what it's worth, I don't believe `\r` should show up without `\n`, but `\n` can show up without `\r`, so a simple substitution of: `"\\r" = ""` and `"\\n" = '\n'` should work. Forgive my psuedo-code. I know how I'd write this in C, but I'm not very familiar with Python.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
neph1/LlamaTale#84
No description provided.