Viewing My Assistant Thread Messages Using The API

When using the assistant playground, this message appears saying that anyone can view my messages using the API

Though, I saw these two messages in the forum:
Forum doesn’t let me add links anymore :frowning: add ‘h’ at the beginning of these links:
ttps://community.openai.com/t/list-of-threads-is-missing-from-the-api/484510/31?u=sargent

ttps://community.openai.com/t/list-of-threads-is-missing-from-the-api/484510/28?u=sargent

Implying that there is no programmatic way of enquiring all my chat history with the assistant, given that I can’t list all threads programmatically.

Which one is correct? Can you list all threads programmatically? if not, why is this message is there in the playground?

@logankilpatrick @sashirestela

1 Like

Adding photos for these broken links

1 Like

1 Like

See my answer here

Couldn’t make it work


Anyway, as I saw from the code. this is actually a wrapper for the OpenAI API that actually manages the threads for you. What if I’m just using the playground, can anyone monitor my thread using the API?

It’s strange that you could not make it work.

Just to be sure, this is what I did in an attempt to reproduce your issue.

  1. created a tmp dir under src
    mkdir tmp
  2. cd tmp
  3. git clone git clone GitHub - icdev2dev/openairetro
  4. cd openairetro
  5. create a virtual env and activate it
    python3 -mvenv ~/envs/tmp_openairetro
    source ~/envs/tmp_openairetro/bin/activate
  6. install the necessary packages
    pip install -r requirements.txt
  7. export OPENAI_API_KEY
    source ~/creds/openai_p
  8. cd into examples/listablethreads
  9. python core.py --list_threads

should get you a

I also ran python interpreter

from core import ListableThread
ListableThread.list()

thread = ListableThread.create()
thread.id
‘thread_Gsk…q’

ListableThread.list()
[Thread(thread_id=‘thread_Gsk…q’)]

Please let me know if these were the steps (roughly) that you took as well?

Yes, this is a wrapper for the OpenAI APIs; making use of the powerful metadata behind the scene.

On your second question, is the concern that given a thread_id, will anyone be able to monitor your thread? I know that I do auto-summarize with low-water-mark on a different process; so that the context of the thread (messages) do not grow too long. In fact this was the primary reason for creating listable threads. So that a process could monitor the growth and auto-summarize and truncate an arbitary set of threads.