dustinblackman / oatmeal

Terminal UI to chat with large language models (LLM) using different model backends, and integrations with your favourite editors!
https://dustinblackman.com/posts/oatmeal/
MIT License
477 stars 23 forks source link

Oatmeal always responds as python code? #38

Open mybuddymichael opened 7 months ago

mybuddymichael commented 7 months ago

I'm happy to download the debug version and help figure out what's going on, but I was curious if there's a clear answer to why Oatmeal always responds to my questions with python code when other clients don't (using the same model, in this case Mistral via ollama)? No matter what I set the system message to (if generic), Oatmeal always wants to respond with Python code, even if the question has nothing to do with coding.

dustinblackman commented 7 months ago

Hey there!

This is likely related to https://github.com/dustinblackman/oatmeal/issues/22. While Oatmeal works most text based LLM use cases, I had originally intended for it to be a coding assistant. In order for LLM's to respond with properly formatted code examples without overriding the system prompt, it appends "Add language to any code blocks" to your first prompt.

Why you're getting a lot of python code back is confusing. Do you have an example model and prompt you're using?

florzanetta commented 6 months ago

I just wanted to say, marginally related to this, that I really love your UI. The project is fantastic and that's why I was looking to make it my main app to interact with multiple models, some of which might not be used for coding.

I saw your branch to add support to customize the system prompt. I'd love that feature. I think it could work as a command line variable, maybe accept the prompt as a file, or have it be a command, like /sys. To maintain the original intent of the app, the current prompt would be the default. Neovim users could have the current prompt as the default config when calling the setup function.

dustinblackman commented 6 months ago

Thanks a lot!

Not a bad idea at all! I had forgotten about that branch. I'd be down to turn that in to a feature. I'll add it to my TODOs. :) https://github.com/dustinblackman/oatmeal/issues/44