You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Integration-OpenAI-Plugin.md
+25-8Lines changed: 25 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ The goal is to turn ChatGPT into a more useful, interactive assistant that can b
6
6
7
7
>For example, in large companies, it can be remarkably hard to find corporate systems via an Intranet, and use different user interfaces. ChatGPT can simplify finding these, and interacting with Natural Language.
8
8
9
-
10
9
This is to explore:
11
10
12
11
| Explore | Status |
@@ -30,14 +29,14 @@ This exploration is changing rapidly. For updates, replace `integration/mcp` fr
30
29
31
30
## Nat Lang ALS Access using OpenAI Plugin
32
31
33
-
34
32
Requires tunnel to local host such as [ngrok](https://ngrok.com/downloads/mac-os?tab=download), then
35
33
36
34
```
37
35
ngrok config add-authtoken <obtain from https://dashboard.ngrok.com/get-started/setup/macos>
38
36
```
39
37
40
38
then start the tunnel
39
+
41
40
```
42
41
ngrok http 5656
43
42
```
@@ -94,13 +93,15 @@ In path /Product, method post is missing operationId; skipping
94
93
```
95
94
96
95
<br>
96
+
97
97
### Custom endpoint for openapi
98
98
99
99
OpenAI requires a openai document, so observe the custom endpoint - `api/api_discovery/openapi` - eg, to test locally: `http://localhost:5656/api/openai`
100
100
101
101
Note: the url for use in ChatGPT is the tunnelled version, from the env variable.
102
102
103
103
<br>
104
+
104
105
### Configure in ChatGPT
105
106
106
107
Then, upload it to the Web version of ChatGPT:
@@ -114,15 +115,31 @@ Provide the url of the openai endpoint:
114
115
115
116
https://tunnel_url.ngrok-free.app/api/openapi
116
117
117
-
118
118
Retrieval worked:
119
119
120
-
* list customers
121
-
122
-
* list the items of order 1 with their product names
120
+
- list customers
121
+
- list the items of order 1 with their product names
123
122
124
123
<br>
125
124
125
+
126
+
127
+
### Update: failed to load
128
+
129
+
We also experimented with update, using `integration/openai_plugin/swagger_3_genai_demo_with_update.json`.
130
+
131
+
It failed to load with
132
+
133
+
```
134
+
In context=('paths', '/Customer/{CustomerId}/', 'patch', 'requestBody', 'content', 'application/json', 'schema'), reference to unknown component Customer_inst; using empty schema
135
+
136
+
In path /Customer/{CustomerId}/, method patch, operationId UpdateCustomer_0, request body schema is not an object schema; skipping
137
+
138
+
In path /Customer/{CustomerId}/, method patch, operationId UpdateCustomer_0, skipping function due to errors
139
+
```
140
+
141
+
142
+
126
143
## Appendices
127
144
128
145
<br>
@@ -133,8 +150,8 @@ Prepare `ai_plug_in.json` as shown in this directory. Observe that it It identi
133
150
134
151
Note: both ALS and and `ai_plug_in.json` presume the swagger and api are consistent:
135
152
136
-
* swagger is at `http://localhost:5656/api/swagger.json`,
137
-
* typical API at `http://localhost:5656/api/Category`
153
+
- swagger is at `http://localhost:5656/api/swagger.json`,
154
+
- typical API at `http://localhost:5656/api/Category`
138
155
139
156
Not required for function - **Settings / Beta / Plugins > Plugin install → expects the ai-plugin.json manifest URL**
0 commit comments