I concur this is a very important feature, it is a show stopper for some projects require chat /dialog like interaction. “you need to develop your session management code”, even dev is able to do son, there no way to pass an session identifier /user id (user parameter is use for abuse detection only) as API parameter to track a dialog thread in a multiple users (using same API key) environment.
Yes, you can specify in all OpenAI API competition calls a “user” which you can use to track actions related to that user, but as mentioned,
OpenAI Safety and Best Practices
Sending end-user IDs in your requests can be a useful tool to help OpenAI monitor and detect abuse. This allows OpenAI to provide your team with more actionable feedback in the event that we detect any policy violations in your application.
However, just because the user param on the OpenAI server / service side of the transaction is only used for abuse monitoring by OpenAI, you can still use the userid / name to manage state on your end.
For example, you can have a database where you store each prompt and completion and you can assign those to a userid.
Even though the current OpenAI API is “stateless”, you can still manage the session and the state in your applications.
I already do this with my OpenAI Rails apps and for all transactions I store the transactions in a DB along with the user and when I create a new topic, I assign that topic an topic id, assign it to a user, etc.
It’s all pretty basic stuff, really, if you have experience with stateless API endpoints.