Advice on using ChatGPT or Copilot to write type external bindings

I would like to have ChatGPT or Copilot help me with type bindings when importing from JS.

Any advice?

I wonder if we could fine-tune GPT

one of my failed attempts using example code from a THREE.js question:

I’ve been asking GPT a myriad of questions about rescript.

Unfortunately there is not enough open source rescript projects or stack overflow questions. It seems that it gets confused with Rescript/reason/bucklescript.

Kind of like a human lmfao

7 Likes

Have you tried adding follow up questions?
ChatGPT does its computation per token, so giving it a chance to say more it can do more.

In one I tried, it produced a polyvariant using the 'VARIANT instead of #VARIANT. but i asked it to correct and it did. Still a puzzle to give it the right “prompts” but maybe across a very large binding it would be powerful?

Ive also noticed that it can be unstable and change more stuff than you asked for, and havnt seen how to reign that in.

Give it the whole threejs bindings and go from there?

A

I did try with follow up questions and corrections but it required a lot of hand holding. So much that I lost trust on whatever binding suggestions that it can come up with.

1 Like