Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix parse_input #21

Closed
wants to merge 1 commit into from
Closed

Fix parse_input #21

wants to merge 1 commit into from

Conversation

gAbelli
Copy link
Contributor

@gAbelli gAbelli commented Apr 21, 2023

Fixes #11 (I believe)

Correct me if I'm wrong, I don't fully understand why the function is parsing and returning args in the first place.
With this change there are no problems in interactive mode, but I don't know if this causes problems elsewhere.

@kharvd
Copy link
Owner

kharvd commented Apr 28, 2023

The reason why we parse args from the prompt is to support overrides like

> This prompt will be run with a different model --model gpt-4

(inspired by Midjourney)

I use this a lot, but can see how it might be annoying if you're pasting some command-line args to the prompt. Not sure what the right solution is, maybe some kind of escaping?

@kharvd kharvd closed this Jul 9, 2023
@sghael
Copy link
Contributor

sghael commented Jun 22, 2024

I hit this bug quite often and I'm assuming many others do. It's not uncommon to cut and paste terminal output into the prompt, to inquire the LLM for help in debugging. Those debugging traces will often have --.

I believe the correct solution is to allow users to triple quote or triple backtick large blocks of input. Triple quoted text should be taken literally into the context, and not parsed.

> This prompt will be run with a different model --model gpt-4
> ```This prompt will be run with a different model``` --model gpt-4

> ```This prompt will NOT be run with a different model --model gpt-4```
> """This prompt will NOT be run with a different model --model gpt-4"""

@sghael sghael mentioned this pull request Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sometimes it erros if given special characters
3 participants