-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement list of threads #16
Labels
enhancement
New feature or request
Comments
Okay |
GET /v1/threads must be made with a session key (that is, it can only be made from the browser). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: