Saltar al contenido principal
Esta página no tiene versión en español, así que te la mostramos en inglés.

Config for chatgpt

Jobs that use the chatgpt adaptor may require authentication. A "credential" for the chatgpt adaptor will follow the schema below. When using the CLI, you can set up your own state.configuration by using the sample below.

Sample Configuration​

Paste this into the configuration key of your state.json file and modify the values to run jobs locally.

{
"apiKey": "sk-proj-api03-YOUR_SECRET_KEY"
}

Full Schema​

The full configuration schema describes each attribute of the credential and notes those that are required.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"apiKey": {
"title": "API Key",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Your OpenAI API key",
"type": "string",
"minLength": 1,
"examples": [
"sk-proj-api03-YOUR_SECRET_KEY"
]
},
"baseUrl": {
"title": "Base URL",
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The URL for the OpenAI-compatible endpoint of the LLM provider",
"type": "string",
"minLength": 1,
"examples": [
"https://api.openai.com/v1"
]
}
},
"type": "object",
"additionalProperties": true,
"required": [
"apiKey"
]
}