Skip to content

Commit 991ff3f

Browse files
committed
more upd testing
1 parent 7aa0de1 commit 991ff3f

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

docs/Integration-OpenAI-Function.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ Enter this into `config/default.env`
5353

5454
<br>
5555

56+
### Use GenAI_Demo
57+
58+
Create it, and from dev-source, copy:
59+
60+
- `api_logic_server_cli/prototypes/nw_no_cust/integration/openai_function`
61+
- `api_logic_server_cli/prototypes/nw_no_cust/api/api_discovery`
62+
- `api_logic_server_cli/prototypes/nw_no_cust/config/default.env`
63+
64+
<br>
65+
5666
### Obtain swagger_3
5767

5868
Obtain swagger 2 from API Logic Server, eg, http://localhost:5656/api/swagger.json)
@@ -61,7 +71,7 @@ Convert to 3: https://converter.swagger.io or other.
6171

6272
<br>
6373

64-
#### Reduce Operations
74+
#### Reduce to 30 Operations
6575

6676
Reduce down to 30 operations (genai_demo has 69).
6777

@@ -92,6 +102,8 @@ In path /Product, method get is missing operationId; skipping
92102
In path /Product, method post is missing operationId; skipping
93103
```
94104

105+
106+
95107
<br>
96108

97109
### Custom endpoint for openapi
@@ -104,7 +116,7 @@ Note: the url for use in ChatGPT is the tunnelled version, from the env variable
104116

105117
### Configure in ChatGPT
106118

107-
Then, upload it to the Web version of ChatGPT:
119+
Then, upload it to the **Web** version of ChatGPT:
108120

109121
1. Explore GPTs
110122
2. Create
@@ -122,29 +134,21 @@ Retrieval worked:
122134

123135
<br>
124136

125-
### Update: failed to load
126-
127-
We also experimented with update, using `integration/openai_plugin/swagger_3_genai_demo_with_update.json`.
137+
### Update: Invalid Data Object
128138

129-
It failed to load with
139+
We also experimented with update, using `integration/openai_plugin/swagger_3.json`.
130140

131-
```
132-
In context=('paths', '/Customer/{CustomerId}/', 'patch', 'requestBody', 'content', 'application/json', 'schema'), reference to unknown component Customer_inst; using empty schema
133-
134-
In path /Customer/{CustomerId}/, method patch, operationId UpdateCustomer_0, request body schema is not an object schema; skipping
135-
136-
In path /Customer/{CustomerId}/, method patch, operationId UpdateCustomer_0, skipping function due to errors
137-
```
141+
> It initially failed to load, which we repaired as noted in Appendix 2.
138142
139-
We requested a revised jasonapi from CHatGPT, which loaded. However, updates are still failing with Invalid Data Object. ChatGPT reports it was sending:
143+
However, updates are still failing with Invalid Data Object. ChatGPT reports it was sending:
140144

141145
![updt error](https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/openai-plugin/upd%20invalid%20obj.png?raw=true)&nbsp;
142146

143147
## Appendices
144148

145149
<br>
146150

147-
### Create ai_plug_in.json
151+
### Appendix 1: Create ai_plug_in.json
148152

149153
We also looked at openai plugins. These appear to be discontinued.
150154

@@ -157,4 +161,21 @@ Note: both ALS and and `ai_plug_in.json` presume the swagger and api are consist
157161

158162
Not required for function - **Settings / Beta / Plugins > Plugin install → expects the ai-plugin.json manifest URL**
159163

160-
This appears to be unavailable for ChatGPT 4o
164+
This appears to be unavailable for ChatGPT 4o
165+
166+
<br>
167+
168+
### Appendix 2: Updateable openapi
169+
170+
It initially failed to load with
171+
172+
```
173+
In context=('paths', '/Customer/{CustomerId}/', 'patch', 'requestBody', 'content', 'application/json', 'schema'), reference to unknown component Customer_inst; using empty schema
174+
175+
In path /Customer/{CustomerId}/, method patch, operationId UpdateCustomer_0, request body schema is not an object schema; skipping
176+
177+
In path /Customer/{CustomerId}/, method patch, operationId UpdateCustomer_0, skipping function due to errors
178+
```
179+
180+
We requested a revised jasonapi from ChatGPT to clear these errors, which loaded.
181+

0 commit comments

Comments
 (0)