Commit a90ce80
Switch to OpenAI Responses API (#1981)
## Summary
#1960 added support for OpenAI's chat completions api.
This change switches to using [OpenAI's new Responses API](https://developers.openai.com/api/docs/guides/migrate-to-responses) instead.
### How to test locally or on Vercel
### How to test locally
1. Set env vars:
`AI_PROVIDER=openai AI_API_KEY= AI_BASE_URL=<> AI_MODEL_NAME=<> AI_REQUEST_HEADERS={"X-Client-Id":"","X-Username":"", AI_ADDITIONAL_OPTIONS = {API_TYPE: "responses"}}`
3. Open Hyperdx's chart explorer and use the AI assistant chart builder
- e.g. "show me error count by service in the last hour"
4. Confirm the assistant returns a valid chart config.
### References
- Linear Issue:
- Related PRs:
Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>1 parent 7828a74 commit a90ce80
File tree
3 files changed
+12
-7
lines changed- .changeset
- packages/api/src/controllers
- __tests__
3 files changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | | - | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
194 | | - | |
| 196 | + | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
372 | | - | |
373 | | - | |
| 371 | + | |
374 | 372 | | |
375 | 373 | | |
376 | 374 | | |
| |||
399 | 397 | | |
400 | 398 | | |
401 | 399 | | |
402 | | - | |
| 400 | + | |
403 | 401 | | |
0 commit comments