SamurAIGPT / Open-Custom-GPT

Create Custom GPT and add/embed on your site using Assistants api
https://customgpt.thesamur.ai
MIT License
1.59k stars 299 forks source link

Is there a way to see existing Assistants in ChatGPT? #30

Open mledwards opened 6 months ago

mledwards commented 6 months ago

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?

Anil-matcha commented 6 months ago

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

mledwards commented 6 months ago

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.

Anil-matcha commented 6 months ago

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