Open-Custom-GPT icon indicating copy to clipboard operation
Open-Custom-GPT copied to clipboard

Is there a way to see existing Assistants in ChatGPT?

Open mledwards opened this issue 9 months ago • 3 comments

I was hoping that by adding my API key I would be able to see list of existing Assistants, do you know if this is possible?

mledwards avatar May 12 '24 10:05 mledwards

Currently it only shows the assistants created from this app, but we can look at providing an option for the same

Anil-matcha avatar May 13 '24 12:05 Anil-matcha

Hi @Anil-matcha. I forked the project to have a play around. I got a list outputting by...

Creating an API route to get the list

const list = await openai.beta.assistants.list();
return NextResponse.json(list.data);

Then fetching that API route on the home page

const listResponse = await fetch("/api/openai/list");
const list = await listResponse.json();

This has the added benefit of hiding the OpenAI API key in the server side API routes, so I'm using this method to share embeds. I'll share you on my fork when it's done.

Let me know if you wanted to chat through any of it.

mledwards avatar May 13 '24 13:05 mledwards

@Anil-matcha Please go ahead and create a pull request and I will merge the changes

Anil-matcha avatar May 19 '24 18:05 Anil-matcha