Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

cleans up the images on the chatgpt plugins example

Copple78cb0ac5df10
diff --git a/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx b/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx
index 239f2a8931e..1f34a54c413 100644
--- a/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx
+++ b/apps/docs/pages/guides/ai/examples/building-chatgpt-plugins.mdx
@@ -23,24 +23,26 @@ It allows ChatGPT to dynamically pull relevant information into conversations fr
## Example: Chat with Postgres Docs
-Let’s build an example where we can “ask ChatGPT questions” about the Postgres documentation. ChatGPT already knows about the Postgres docs, because they are publicly available, but this is still a useful example which will show you how to work with PDF files.
+Let’s build an example where we can “ask ChatGPT questions” about the Postgres documentation. Although ChatGPT already knows about the Postgres documentation because it is publicly available, this is a simple example which demonstrates how to work with PDF files.
-This will require several steps:
+This plugin requires several steps:
1. Download all the [Postgres docs as a PDF](https://www.postgresql.org/files/documentation/pdf/15/postgresql-15-US.pdf)
2. Convert the docs into chunks of embedded text and store them in Supabase
3. Run our plugin locally so that we can ask questions about the Postgres docs.
+We'll be saving the Postgres documentation in Postgres, and ChatGPT will be retrieving the documentation whenever a user asks a question:
+
<img
className="dark:hidden !m-0"
alt="diagram reference"
- src="https://supabase.com/images/blog/2023-05-25-chatgpt-plugins-support-postgres/chatgpt-plugin-scheme--light.png"
+ src="/docs/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--light.png"
/>
<img
className="hidden dark:block !m-0"
alt="diagram reference"
- src="https://supabase.com/images/blog/2023-05-25-chatgpt-plugins-support-postgres/chatgpt-plugin-scheme--dark.png"
+ src="/docs/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--dark.png"
/>
### Step 1: Fork the ChatGPT Retrieval Plugin repository
@@ -91,7 +93,7 @@ Using `supabase-cli` is not required and you can use any other docker image or h
To create embeddings Plugin uses OpenAI API and `text-embedding-ada-002` model. Each time we add some data to our datastore, or try to query relevant information from it, embedding will be created either for inserted data chunk, or for the query itself. To make it work we need to export `OPENAI_API_KEY`. If you already have an account in OpenAI, you just need to go to [User Settings - API keys](https://platform.openai.com/account/api-keys) and Create new secret key.
-![OpenAI Secret Keys](/images/blog/2023-05-25-chatgpt-plugins-support-postgres/openai-secret-keys.png)
+![OpenAI Secret Keys](/docs/img/ai/chatgpt-plugins/openai-secret-keys.png)
### Step 6: Run the plugin
@@ -108,7 +110,7 @@ INFO: Waiting for application startup.
INFO: Application startup complete.
```
-The plugin will start on your localhost - port :3333 by default.
+The plugin will start on your localhost - port `:3333` by default.
### Step 6: Populating data in the datastore
@@ -134,23 +136,19 @@ We are using `lists = 10`, because as a general guideline, you should start look
To integrate our plugin with ChatGPT, register it in the ChatGPT dashboard. Assuming you have access to ChatGPT Plugins and plugin development, select the Plugins model in a new chat, then choose "Plugin store" and "Develop your own plugin." Enter `localhost:3333` into the domain input, and your plugin is now part of ChatGPT.
-![ChatGPT Change Model](/images/blog/2023-05-25-chatgpt-plugins-support-postgres/chatgpt-change-model.png)
-
-![ChatGPT Plugin Store](/images/blog/2023-05-25-chatgpt-plugins-support-postgres/chatgpt-plugin-store.png)
+![ChatGPT Plugin Store](/docs/img/ai/chatgpt-plugins/chatgpt-plugin-store.png)
-![ChatGPT Local Plugin](/images/blog/2023-05-25-chatgpt-plugins-support-postgres/chatgpt-local-plugin.png)
+![ChatGPT Local Plugin](/docs/img/ai/chatgpt-plugins/chatgpt-local-plugin.png)
-You can now ask questions about Postgres and receive answers derived from the documentation!
+You can now ask questions about Postgres and receive answers derived from the documentation.
Let's try it out: ask ChatGPT to find out when to use `check` and when to use `using`. You will be able to see what queries were sent to our plugin and what it responded to.
-![Ask ChatGPT](/images/blog/2023-05-25-chatgpt-plugins-support-postgres/ask-chatgpt.png)
-
-![ChatGPT Query](/images/blog/2023-05-25-chatgpt-plugins-support-postgres/chatgpt-query.png)
+![Ask ChatGPT](/docs/img/ai/chatgpt-plugins/ask-chatgpt.png)
And after ChatGPT receives a response from the plugin it will answer your question with the data from the documentation.
-![ChatGPT Reply](/images/blog/2023-05-25-chatgpt-plugins-support-postgres/chatgpt-reply.png)
+![ChatGPT Reply](/docs/img/ai/chatgpt-plugins/chatgpt-reply.png)
## Resources
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/ask-chatgpt.png b/apps/docs/public/img/ai/chatgpt-plugins/ask-chatgpt.png
new file mode 100644
index 00000000000..c936d71b68a
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/ask-chatgpt.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-change-model.png b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-change-model.png
new file mode 100644
index 00000000000..5151367c291
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-change-model.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-local-plugin.png b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-local-plugin.png
new file mode 100644
index 00000000000..7b9a3158130
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-local-plugin.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--dark.png b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--dark.png
new file mode 100644
index 00000000000..261b95b3d28
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--dark.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--light.png b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--light.png
new file mode 100644
index 00000000000..a6e7490ffeb
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-scheme--light.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-store.png b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-store.png
new file mode 100644
index 00000000000..ecff2df51d4
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugin-store.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugins-support-postgres.jpeg b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugins-support-postgres.jpeg
new file mode 100644
index 00000000000..535a886b22b
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-plugins-support-postgres.jpeg differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-query.png b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-query.png
new file mode 100644
index 00000000000..08b8553d6d9
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-query.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-reply.png b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-reply.png
new file mode 100644
index 00000000000..d3b34a61028
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/chatgpt-reply.png differ
diff --git a/apps/docs/public/img/ai/chatgpt-plugins/openai-secret-keys.png b/apps/docs/public/img/ai/chatgpt-plugins/openai-secret-keys.png
new file mode 100644
index 00000000000..e0f2e6e0247
Binary files /dev/null and b/apps/docs/public/img/ai/chatgpt-plugins/openai-secret-keys.png differ