How to work with the new open AI, model GPT 3.516k?

Open AI just released a new version of the GPT 3 & 4 model. But how to implement it?

I know that it’s already accessible in the open AI node, but how to call a function?

Any ideas?

Hey @ManyQuestions,

We don’t yet have the function option in the node, I have just created an internal dev ticket to get that added although I don’t think it is going to be a quick change as it looks like the function needs to be part of the node as well so we might have to add a function field and work out a way to sandbox it similar to the code node.

Our internal tracking reference for this is NODE-596

1 Like

Thx alot. Is there a workaround, like using a code + http request node?

Hey @ManyQuestions,

Looking at the API example you could use a HTTP Request node to send the request but it looks like the function needs to be ran on the response… You might be able to do it using just a code node if you are feeling brave.

1 Like

Feeling yes- would know how to do- different story :sweat_smile:

I guess it’s a mix between this:

And this:

But yea- i could just ask chat gpt to blend it together… :joy:

1 Like

@Jon example above is gpt4 but i guess 3.5 is more feasable.

Hey @ManyQuestions,

It will be the same for both really the only change would be the model but don’t forget it would need to be javascript and you would be sending the http request from the code node so you would need to add some imports.

Sorry for the late reply. So yea- how do i implement this into n8n?

Hey @ManyQuestions,

You would have needed to use a code node and manually make your request to work with the API following the documentation that OpenAI provide. It may not be easy and it will take a bit of work but at the moment we don’t have an example on how to do this.

What we do have though is this PR… feat(OpenAI Node): Support for functions by michael-radency · Pull Request #6508 · n8n-io/n8n · GitHub

This will add function support to the OpenAI node, I don’t have a timeline on this as it depends on how long it takes for the internal review but I suspect it will be available in a new release next week or the week after. If you need function support before then it would be back to the code node or maybe make a custom image from that PR and see how it goes.

1 Like

No thx. The timeframe is good enough. Love u guys!!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.