gpt4all icon indicating copy to clipboard operation
gpt4all copied to clipboard

Chat client: code formatting and font size

Open AndriyMulyar opened this issue 1 year ago • 4 comments

Feature request

  • All code/JSON/yaml should be auto formatted when - generated in the chat client when generated. We should support code blocks like GitHub markdown does.

  • Add the ability to modify font size through a setting.

Motivation

Generation of code, JSON, yaml, etc is currently difficult to parse.

Default font size is not accessible to all.

Your contribution

Related PR for font: https://github.com/nomic-ai/gpt4all/issues/488

AndriyMulyar avatar May 20 '23 15:05 AndriyMulyar

This will be a difficult task for non-Qt experts. I have a branch open that starts this to give an idea of the complexity... This was the commit in the old repo:

https://github.com/nomic-ai/gpt4all-chat/compare/master...syntax

manyoso avatar May 20 '23 17:05 manyoso

All code/JSON/yaml should be auto formatted when - generated in the chat client when generated. We should support code blocks like GitHub markdown does.

I've occasionally looked at CommonMark progression/discussion and that alone could be tricky; seeing how these models work, there's no guarantee the output is in a specific dialect -- although github-flavoured is probably a very good base assumption.

But there are many, many dialects, see e.g. the Pandoc Markdown documentation to get an idea.

Side note: some markup languages are not safe by default (e.g. YAML; processing instructions) and then it depends on the parser which is used. Although with the auto-generated output from these things, malicious markup is probably unlikely.

In any case:

  • I wouldn't tag this as a 'good first issue'.
  • Probably needs a toggle in the interface to enable/disable the feature.

cosmic-snow avatar May 20 '23 19:05 cosmic-snow

I wonder if we could focus on creating a web portal to interact with the chatbot, instead of a Qt application.

PlebeiusGaragicus avatar May 24 '23 19:05 PlebeiusGaragicus

Some early notes on the feature as implemented in GPT4All v2.4.4:

  • I do like the experience of it. It's pretty neat when it goes well.

  • when it doesn't go well, there's a problem: e.g. anything between angled brackets <for example can be multiple words> might be swallowed wholesale in the display of the input or output, because HTML is allowed as an escape hatch in certain places in Markdown.

cosmic-snow avatar May 28 '23 03:05 cosmic-snow

There's already an issue regarding markdown: https://github.com/nomic-ai/gpt4all/issues/530 - closed, because nobody seems to care.

gisturbance avatar Jun 17 '23 20:06 gisturbance

Newest release 2.4.8 implements markdown. Issue was closed due to being a potential duplicate (we had over 400 issues of varying importance, sorry if your issue got closed).

AndriyMulyar avatar Jun 17 '23 20:06 AndriyMulyar

I think this is done now?

Please always feel free to open more issues as needed.

niansa avatar Aug 14 '23 11:08 niansa