Node.JS Assistants support

When will an updated Node.JS library drop that has Assistants support? The code samples are up but the published library doesn’t support the code samples yet.


Apparently, we’ll have to wait a bit :slight_smile:

We’ll begin rolling out new features to OpenAI customers starting at 1pm PT today.

Thanks! I’m just mocking up all the interfaces based on the samples :slight_smile:

1 Like

The REST API’s with associated types are here:

1 Like

According to their repo they just built version 4.16 of the node.js library with dev day features

The new node package, v 4.16.0, is out now.

Yep! I have Assistants working in Microsoft Teams using my Teams AI Library :slight_smile:

I’ll share code later for how I approached the polling logic. I have a fairly complex scenario that I need to support group chat with an assistant so I implemented logic to make incoming messages wait for a run to complete before trying to start a new run.

It’s relatively straight forward. You have to set in a loop checking for the last run to enter a completed state, but you have to keep re-checking since other messages could be competing to start a new run.

Its basically a Mutex but there’s still a small window where two callers could get released at the same time. Polling sucks :frowning:

I got it to work as well and strung together a scrappy example and published it on Medium and YouTube. By no means perfect, but hopefully something that people can look at, learn from, and improve on.

I’m unable to share links here, so :man_shrugging:.

1 Like

saw your example but I get “openai.beta.assistants cannot read properties of undefined (reading ‘assistants’)”

How did you get support for assistants w/ node?

I never had any issues with that. Did you update the OpenAI node package to latest? They dropped 4.16.1 yesterday.

1 Like