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

Added preprompt #210

Merged
merged 1 commit into from
Feb 8, 2024
Merged

Added preprompt #210

merged 1 commit into from
Feb 8, 2024

Conversation

guhitb
Copy link
Contributor

@guhitb guhitb commented Feb 6, 2024

Adds the value from the -preprompt cli flag before user input in each mode.
For multiline mode, the preprompt is added to the input textarea.
For interactive mode, the preprompt isn't show to the user but is still used.

Related: #151

tgptpreprompt.mp4

added preprompt to text generation
@aandrew-me
Copy link
Owner

You didn't add preprompt for the default mode. Here

Also, I actually wanted to use the preprompt as system prompt instead of just adding it to the prompt, since the AI would take that prompt more seriously, I think.

@aandrew-me
Copy link
Owner

Also, I just want to thank you for helping to improve the program :)

@guhitb
Copy link
Contributor Author

guhitb commented Feb 7, 2024

Thanks for creating it! It's been really helpful for programming 😄

It looks like system prompts are implemented differently for each provider. I think I can get it working for most providers, but the opengpts format looks different. Does opengpts not have message history?

@aandrew-me
Copy link
Owner

Indeed, they are implemented differently. I can merge this request as it is, later I will individually change prompts to system prompts for each provider separately.
Opengpts changed the way they remember messages, they use thread ids with user ID in cookies.

@aandrew-me aandrew-me merged commit a7f3522 into aandrew-me:main Feb 8, 2024
@ssergorp
Copy link

This works for only one message using the -i, -m flags. And when you use the -m flag, you see it in the msg prompt. When I saw the -preprompt flag I assumed it would function like a config option you could set once, and from then on would automatically be used as system prompt for whatever provider or model you used.

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.

3 participants