I am developing a website in React and I want to add a GPT chat inside it, so the user will log in or sign up and the chat will appear inside an iframe or something like that, without using 3rd party services.
How can I do it? because when I’m trying to add the GPT chat inside an iframe with a chat ID I’m getting a CORS error and I can’t show the chat.
The Assistants API allows you to build AI assistants within your own applications. An Assistant has instructions and can leverage models, tools, and knowledge to respond to user queries. The Assistants API currently supports three types of tools: Code Interpreter, Retrieval, and Function calling. In the future, we plan to release more OpenAI-built tools, and allow you to provide your own tools on our platform.
You can explore the capabilities of the Assistants API using the Assistants playground or by building a step-by-step integration outlined in this guide. At a high level, a typical integration of the Assistants API has the following flow:
Create an Assistant in the API by defining its custom instructions and picking a model. If helpful, enable tools like Code Interpreter, Retrieval, and Function calling.
Create a Thread when a user starts a conversation.
Add Messages to the Thread as the user ask questions.
Run the Assistant on the Thread to trigger responses. This automatically calls the relevant tools.
The Assistants API is in beta and we are actively working on adding more functionality. Share your feedback in our Developer Forum!
Thanks.
Can I give the user an option to log in or sign up to chat GPT and then start the API with his details? instead of paying to the API for each request? @PaulBellow
Hope you stick around. We’ve got a great community “garden” growing here, and it sounds like you might fit in. Once you hit Trust Level 3 here at the forum, there’s perks, but it’s a long, windy road a lot of us have gone down since this place started a few years ago.
But yeah, have a look around. Hope you stay! Great group of people here.
Glad I could help it make a bit more sense for you.
Hi - I was wondering if this has changed by any chance or is it still the case? I don’t see an option to embded currently. Is there an API we can call?
Alternatively, are there any applications that I can link to our MongoDB that can act as vector layer over select database of my company data so we can create custom GPT for our company?
Integrating a GPT chat directly into your React website can be tricky, especially with CORS issues. I ran into a similar problem while adding a chat feature to a project. I found that using a direct API call from your server side rather than an iframe can help bypass CORS errors. You can set up an endpoint on your server that handles the chat requests and then use that to communicate with the GPT model.