openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

array + enum in function calling

Open Dyke-F opened this issue 1 year ago • 1 comments

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • [X] This is a feature request for the Python library

Describe the feature or improvement you're requesting

Is it currently possible to get function calling with an array of inputs for an argument and a restriction via enums: something like:

'parameters': {'type': 'object', 'properties': {'lab_values': {'type': 'array', 'enum': ['Asparate Aminotransferase (AST)', 'Barbiturate Screen', 'Benzodiazepine Screen', ]}}, 'required': ['lab_values'], 'additionalProperties': False}}}]

?

Additional context

No response

Dyke-F avatar Sep 04 '24 13:09 Dyke-F

This sounds like an issue with the underlying OpenAI API and not the SDK, so I'm going to go ahead and close this issue.

I think this should be possible but would you mind reposting at community.openai.com?

RobertCraigie avatar Sep 24 '24 09:09 RobertCraigie