Skip to main content

OpenAI GPTs

OpenAI GPTs allow you to create personalized ChatGPTs by mixing special instructions, additional knowledge, and a range of skills. This is very useful for making custom AI models. However, only OpenAI Plus subscribers can use these custom GPTs through the ChatGPT app.

PlugBear simplifies bringing custom GPTs into other services like Slack or Discord.

note

Pricing for OpenAI Assistants varies from the ChatGPT Plus Plan, as charges are based on usage. For more information, please refer to the OpenAI Pricing. To review your current usage plans and limits, visit the OpenAI Billings and OpenAI Limits pages.

Importing OpenAI GPTs to PlugBear

There are two ways to import GPTs.

Using the Bookmarklet

OpenAI GPTs Bookmarklet

  1. Display your Bookmarks Bar. For example, you can display Google Chrome's Bookmarks Bar by selecting the menu View > Always Show Bookmarks Bar from the menu bar.

  2. Drag this link (GPTs ➜ PlugBear) to your bookmarks bar.

  3. Go to chatgpt.com and open the GPTs you want to convert to an Assistant.

  4. Click the Import GPTs button in your bookmarks bar.

Using the Address Bar

OpenAI GPTs Bookmarklet

  1. Copy the following code:
if("chatgpt.com"===window.location.hostname&&window.location.pathname.startsWith("/g/")){const t=window.location.pathname.split("/")[2].substring(0,11),e=Object.fromEntries(document.cookie.split("; ").map((t=>t.split("="))))._account;document.body.outerHTML='<body style="background-color: #1E1E1E; display: flex; justify-content: center; align-items: center;">\\n<article style="display: flex; flex-direction: column; align-items: center; row-gap: 0.5rem;">\\n<img src="APP_URL/apple-icon.png" width="180" height="auto" />\\n<div\\n  style="display: flex; align-self: flex-start; align-items: center; column-gap: 0.25rem; padding-left: 0.25rem; padding-right: 0.25rem;">\\n  <img src="APP_URL/images/slack/spinner.png" width="32" height="32" />\\n  <p>\\n    <span id="status" style="flex: 1 1 0%; color: rgb(255 255 255);">Initiating</span>\\n    <span id="dots">.</span>\\n  </p>\\n</div>\\n</article>\\n</body>';const n=document.getElementById("status"),i=document.getElementById("dots"),o=setInterval((()=>{i.textContent=i.textContent.length<3?i.textContent+".":"."}),500);void fetch("https://chatgpt.com/api/auth/session").then((t=>t.json())).then((n=>fetch(`https://chatgpt.com/backend-api/gizmos/${t}?draft=true`,{headers:{authorization:`Bearer ${n.accessToken}`,"Chatgpt-Account-Id":e}}).then((t=>{if(!t.ok)throw new Error("Unable to retrieve GPTs data. This function is limited to GPTs that you own.");return t.json()})).then((t=>({session:n,body:t}))))).then((({session:i,body:o})=>o.files.length<=0?o:(n.textContent="Loading Files",Promise.all(o.files.map((n=>fetch(`https://chatgpt.com/backend-api/files/${n.file_id}/download?gizmo_id=${t}`,{headers:{authorization:`Bearer ${i.accessToken}`,"Chatgpt-Account-Id":e}}).then((t=>t.json())).then((t=>({...n,body:t})))))).then((t=>(o.files=t,o)))))).then((t=>{n.textContent="Transferring GPT to PlugBear";const e=document.createElement("form");e.setAttribute("method","post"),e.setAttribute("action","APP_URL/api/apps/import/gpts?ver=3.1");const s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name","name"),s.setAttribute("value",t.gizmo.display.name);const a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name","instructions"),a.setAttribute("value",t.gizmo.instructions);const r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name","description"),r.setAttribute("value",t.gizmo.display.description);const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","tools"),l.setAttribute("value",JSON.stringify(t.tools));const c=document.createElement("input");c.setAttribute("type","hidden"),c.setAttribute("name","files"),c.setAttribute("value",JSON.stringify(t.files)),e.appendChild(s),e.appendChild(a),e.appendChild(r),e.appendChild(l),e.appendChild(c),document.body.appendChild(e),e.submit(),clearInterval(o),i.textContent="",n.textContent="Redirecting to PlugBear"})).catch((t=>{alert("Error fetching GPT. "+t.message),window.location.reload()})).finally((()=>clearInterval(o)))}else alert("Please open a GPTs app in chatgpt.com to import it.");
  1. Go to chatgpt.com and open the GPTs you want to convert to an Assistant.
  2. In the address bar, type javascript:. Then, paste the copied code next to it.
  3. Press enter and wait to import the GPTs.

Getting OpenAI API Key

You need to get or create the OpenAI API key to integrate OpenAI Assistants.

  1. Visit the OpenAI API keys page and click the Create new secret key button.
  2. Click the Create secret key button on the dialog to create one.
  3. Copy the created key to use it later.

OpenAI API Keys

Selecting Models

Select the model to use. (e.g., gpt-4-1106-preview) You can find the details about each model at the OpenAI Models page.

What's Next

Connect the app you added to communication channels. Check Connecting Channels with LLM Apps for more details. Or, continue reading to learn how to utilize Tools.