OpenFn / apollo

GNU Lesser General Public License v2.1
0 stars 2 forks source link

gpt-turbo code generator returns markdown code #38

Open josephjclark opened 9 months ago

josephjclark commented 9 months ago

When I run code generation with the gpt turbo model, the output code is nested in a markdown code block, like this:

```javascript
import { http } from '@openfn/language-common';

export function getGoals(callback?: Function): Operation {
  /* ... omitted */
}

This is not executable Javascript.

I am not sure why this is. I remember for a long time the generated output was always wrapped in a comment.

I can easily workaround this in the CLI but the fact is the code generator should be generating real code - not markdown.

Maybe I'm using the wrong model, this was the first one I could get working.