openai-node
openai-node copied to clipboard
Clarify if "description" of JSON schema parameters is taken into the account
Confirm this is a feature request for the Node library and not the underlying OpenAI API.
- [X] This is a feature request for the Node library
Describe the feature or improvement you're requesting
I am using runTools.
If I provide description to parameters, are they taken into account?, e.g.
{
type: 'object',
properties: {
artForm: {
type: 'string',
description: 'art form, style, e.g. Digital illustration and flat colors. Output all in UPPERCASE.'
},
content: {
type: 'string',
description: 'image content/subject, description of action, state, and mood, e.g. Human silhouette against a large, glowing AI brain, hands hovering over a keyboard, brainstorming and typing.'
},
description: { type: 'string', description: 'SEO description of the image.' },
name: {
type: 'string',
description: 'name of the image, e.g. "Human and AI Brain"'
},
settings: {
type: 'string',
description: 'additional settings, such as lighting, colors, and framing, e.g. Backlit with ambient blue and green hues to symbolize innovation and creativity, medium shot with focus on the interaction between human and AI brain'
}
},
required: [ 'artForm', 'content', 'description', 'name', 'settings' ],
additionalProperties: false,
'$schema': 'http://json-schema.org/draft-07/schema#'
}
Based on my experimentation, they are not, but I wanted to clarify.
Additional context
Reading https://github.com/openai/openai-node?tab=readme-ov-file#automated-function-calls is not clear if they are.
@adaboese - not sure if this will help you at all, but the description value is being included for each function in the tools parameter when sending the requests to Open AI API. see https://github.com/openai/openai-node/blob/master/src/lib/AbstractChatCompletionRunner.ts#L564