Open trevorstr opened 7 months ago
The 'perl' might just be part of the Markdown. GitHub supports that, too, so let me demonstrate:
```perl
print "Hello World\n";
is displayed as:
```perl
print "Hello World\n";
Note the colours, that's basically all it does.
So maybe the output of the model is triple backticks followed by 'perl' and the box doesn't know how to format that. The problem here is of course that it should be 'posh' or 'powershell' or something. So basically, I think the model is misbehaving.
Can you start fresh and regenerate the response a few times? Does it always happen?
Edit:
Looks like neither PowerShell nor Perl have syntax highlighters yet. See here:
Yeah I'm familiar with the syntax highlighting capability in GitHub, and similar platforms. I kinda figured the issue might be related to that. 😆
I re-opened the app and tried a couple more examples.
At least this time, the language is correct, but it's still not rendering it properly.
The same problem exists with Rust code blocks, too.
Right. So the problem you've brought up first (mismatch) was just the model giving bad responses.
As you can see in the edit I made, and if you follow the link to responsetext.cpp, there aren't any syntax highlighters for these three languages yet.
Maybe you want to turn this issue in a feature request for PowerShell, Rust and possibly Perl?
Bug Report
I am running GPT4All on MacOS Sonoma 14.4.1. I asked the Mistral Instruct model to generate a sample PowerShell function. Each of the code blocks is prefixed with "perl" for some odd reason.
Here's another example of the bug:
Steps to Reproduce
Expected Behavior
Code blocks are printed out, without the "perl" text as a prefix.
Your Environment