I’m making a call to OpenAI API but the answer comes with this format: “\n\n”.
How can I make it plain-text?
amer
3
You can watch this video : https://youtu.be/a4pwESPhQbQ
he solved this problem.
I tried what he did <split by ()> but it didn’t work.
Something wrong with your JSON. Basically, it shouldn’t come like that.
Interesting. Do you see something wrong in the API call?
Seem like it’s not Open AI. URL is totally different.
Use REGEX to remove
regex code: /\r?\n|\r/g
That’s a normal response from openai. The browser should automatically handle \n
Yes but not sure why it looks like this in the browser:
My mistake, it’s openai through flowise. I tried the regex code but didn’t work. Thanks anyway!
can you paste here your text? I’ll run over in regex validator
I’ll ask what I’m guessing is a stupid question because I’m sure I am missing something… can’t you use the :find & replace operator to find \n\n and replace it with nothing?
2 Likes
Thanks, it worked to replace the “/n” but the problem is still there cause “/n” means “new paragraph”. I have all in the same line and the UI is not nice. I’ll keep researching and see if I can solve it.
Jici
18
Instead of replacing by nothing, replace it by newline (click enter in replace by)
6 Likes
Thanks, this fixed the issue