Azure / Azure/azure-rest-api-specs
[BUG] Undefined property "function_call_id" in chatCompletionRequestMessageFunction schema
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
### API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/87a08b955c257c773a3bd42553c718d4b1092955/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-02-01/inference.json#L2316
### API Spec version
2024-02-01
### Describe the bug
The OpenAPI Spec contains an inconsistency in the chatCompletionRequestMessageFunction schema. The schema includes the following constraints:
``` YAML
required:
- function_call_id
- content
```
However, the property "function_call_id" does not appear anywhere in the entire specification. When using libraries like prance to obtain the specification object, an error like the following occurs:
```
ExtraParametersError: Required list has not defined properties: ['function_call_id']
The above exception was the direct cause of the following exception:
```
This inconsistency may hinder the creation of data using the OpenAPI Spec or cause issues with POST data validation.
### Expected behavior
Can retrieve specifications without errors
### Actual behavior
The following error occurs when trying to retrieve the specifications.
```
ExtraParametersError: Required list has not defined properties: ['function_call_id']
The above exception was the direct cause of the following exception:
```
### Reproduction Steps
To reproduce the error:
Use the following python code snippet to parse the OpenAPI Spec:
``` python
from prance import ResolvingParser
# Parse the OpenAPI definition and resolve $refs
parser = ResolvingParser('aoai_spec.json')
# Get the resolved definition
resolved = parser.specification
```
### Environment
OS: Windows 10
language: Python
Contributor guide
Assessment
This issue has not been assessed yet.