I’ve been trying to get the OpenAI Profile example action to work for chat completions, but it keeps return v1/chat/completions is an invalid url.
I haven’t changed anything from the example, and I made sure to add my apiKey and tested the v1/me works.
Here’s the schema:
{
"openapi": "3.1.0",
"info": {
"title": "OpenAI Profile",
"description": "Gets data about the current user's OpenAI profile",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://api.openai.com"
}
],
"paths": {
"/v1/me": {
"get": {
"description": "Gets the user's profile",
"operationId": "GetProfile",
"parameters": [],
"deprecated": false,
"security": [
{
"apiKey": []
}
]
}
},
"/v1/chat/completions": {
"post": {
"description": "Creates a model response for the given chat conversation.",
"operationId": "RequestCompletion",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RequestCompletionRequestSchema"
}
}
},
"required": true
},
"deprecated": false,
"security": [
{
"apiKey": []
}
]
}
}
},
"components": {
"schemas": {
"RequestCompletionRequestSchema": {
"properties": {
"model": {
"type": "string",
"title": "model",
"description": "ID of the model to use"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"system",
"user",
"assistant"
]
},
"content": {
"type": "string"
}
}
}
}
},
"type": "object",
"required": [
"model",
"messages"
],
"title": "RequestCompletionRequestSchema"
}
},
"securitySchemes": {
"apiKey": {
"type": "apiKey"
}
}
}
}
Any help on this would be much appreciated