Function returns blank response

Hi all,

I have a simple setup which uses the function calling example from the API documentation (What’s the weather in boston). I have it configured to send to model: gpt-3.5-turbo-0613.

The only change vs the example is that I’ve converted it to node.js.

Weirdly, I’m getting an empty response to the call:

{ totalTokens: 0, finishReason: ‘’, completionText: ‘’ }

If I expand the demo to allow a conversation to occur, the rest of the calls work fine and I get the expected response. However, if I ask it what the weather is like anywhere (therefore triggering the possibility of returning the function) I get the empty response.

As such I see that it is correctly identifying when it needs to return a function as the reponse, but then returning me a blank response rather than one documenting the function to call.

Has anybody else experienced this?

Many thanks!


Are you using a particular node openai library or making plain axios/fetch HTTP calls? If using a library, I’d double check that 1) it added support for functions, and 2) your on the latest version.


Yeah I’m using the official node library… this is a great shout - I don’t think I’ve updated it. Will report back.

I’m using node.js and the weather example works fine for me. I’m using axios versus the node library though but I can confirm that they did update the node library.