Open nyngwang opened 1 year ago
I wasn't able to reproduce this when using gpt-4, but do see it now when I switch to one of the gpt-3.5 models. So not sure what we can do about this. I did at least add some a more helpful error message when this does happen, so you can see what is invalid in the response now
Now the error becomes
Error executing vim.schedule lua callback: ...colorscheme/lua/text-to-colorscheme/internal/asserts.lua:9: [text-to-colorscheme] Received unexpected response from OpenAI:
return {
background = "#161616",
foreground = "#d9d9d9",
accents = {
"#76b900",
"#0066cc",
},
}
stack traceback:
[C]: in function 'error'
...colorscheme/lua/text-to-colorscheme/internal/asserts.lua:9: in function '_raise'
...colorscheme/lua/text-to-colorscheme/internal/asserts.lua:19: in function 'that'
...-colorscheme/lua/text-to-colorscheme/internal/openai.lua:221: in function 'onexit'
...-colorscheme/lua/text-to-colorscheme/internal/openai.lua:249: in function <...-colorscheme/lua/text-to-colorscheme/internal/openai.lua:248>
Looks like openai didn't understand the instructions correctly, and returned only 2 accent colors instead of 7
my query:
bg=16161d;greytext;orangekeyword;bluestring
.