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

Allow fully customizing system and user message #56

Open
justinlovinger opened this issue Apr 13, 2024 · 0 comments
Open

Allow fully customizing system and user message #56

justinlovinger opened this issue Apr 13, 2024 · 0 comments

Comments

@justinlovinger
Copy link

The system-message can be partially customized using options like --ollamaContext. However, a portion of the system-message and all the user-message is hard-coded, https://github.com/leona/helix-gpt/blob/master/src/providers/ollama.ts#L68. The hard-coded messages work poorly for some models and use-cases.

How about, instead of,

config.ollamaContext?.replace("<languageId>", languageId) + "\n\n" + `End of file context:\n\n${contents.contentAfter}`

for the system-message, and,

`Start of file context:\n\n${contents.contentBefore}`

for the user-message, something like, config.ollamaSystemMessage?.replace("<languageId>", languageId).replace("<contentBefore>", contents.contentBefore).replace("<contentAfter>", contents.contentAfter) for the system-message, and config.ollamaUserMessage?.replace("<languageId>", languageId).replace("<contentBefore>", contents.contentBefore).replace("<contentAfter>", contents.contentAfter) for the user-message. The default messages can still be the same, and users can still create the same messages as before, but this allows greater customization.

P.S. It would be nice to similarly customize chat-messages. However, that may be better handled by fully customizing actions.

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

No branches or pull requests

1 participant