provider Chat GET
/chat/completions @utdk/openai
/chat/completions List stored Chat Completions. Only Chat Completions that have been stored
with the `store` parameter set to `true` will be returned.
- model query
- The model used to generate the Chat Completions.
- string
- metadata query
- A list of metadata keys to filter the Chat Completions by. Example: `metadata[key1]=value1&metadata[key2]=value2`
- object
- after query
- Identifier for the last chat completion from the previous pagination request.
- string
- limit query
- Number of Chat Completions to retrieve.
- integer
- order query
- Sort order for Chat Completions by timestamp. Use `asc` for ascending order or `desc` for descending order. Defaults to `asc`.
- enum: asc, desc
Try it
Authentication
Configure credentials for OpenAI API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import openai from '@utdk/openai';
await openai.listchatcompletions({
"limit": 20,
"order": "asc"
})