Java client library for OpenAI API.Full support for all OpenAI API models including Completions, Chat, Edits, Embeddings, Audio, Files, Assistants-v2, Images, Moderations, Batch, and Fine-tuning.
GET /v1/threads must be made with a session key (that is, it can only be made from the browser).
At present, the OpenAI API does not support obtaining Threads lists through api
Is it possible to implement GET in the threads API to find out all the threads you created.
It seems to be possible also if not officially documented using the following example:
def list_threads(api_key): response = requests.get( 'https://api.openai.com/v1/threads?order=desc&limit=20', headers={ 'Content-Type': 'application/json', 'Authorization': f'Bearer {api_key}', 'OpenAI-Beta': 'assistants=v1' } ) if response.status_code == 200: return response.json()['data'] return None
Please consider this new feature in the next release. Thanks