Skip to content
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

Closed
gastaldelloa opened this issue May 11, 2024 · 2 comments
Closed

Implement list of threads #16

gastaldelloa opened this issue May 11, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@gastaldelloa
Copy link

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

@Lambdua
Copy link
Owner

Lambdua commented May 12, 2024

Okay

@Lambdua
Copy link
Owner

Lambdua commented May 12, 2024

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

@Lambdua Lambdua added the enhancement New feature or request label May 12, 2024
@Lambdua Lambdua closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants