Datatypes for fields should match in NPM package vs. API reference. #29370
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
This issue needs attention from Azure service team or SDK team
OpenAI
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
This issue is responsible by Azure service team.
Is your feature request related to a problem? Please describe.
In my opinion @azure/openai package should follow the same datatypes definition that official AzureOpenAI API.
I've noticed that "created" field is a Date, while OpenAI and Azure OpenAI API references, have this field in "number" (int) format.
Example for created date in chat completions below.
Created date in this package -> https://learn.microsoft.com/en-us/javascript/api/@azure/openai/chatcompletions?view=azure-node-preview#@azure-openai-chatcompletions-created
Created date in Azure OpenAI Rest Api -> https://github.com/Azure/azure-rest-api-specs/blob/e6a20fec72ed3bcb4b43c559ee20b56ca2786ec0/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-02-01/inference.json#L2467
Describe the solution you'd like
Datatypes are the same. Example -> "created" field [date vs number].
Describe alternatives you've considered
If it's not possible, it will be nice to mention in package documentation, which fields are not the same datatype, so community will be careful about them.
Additional context
"created" field was 'number' few months back; but it was changed by this PR -> [OpenAI] Support Functions by deyaaeldeen · Pull Request #26782 · Azure/azure-sdk-for-js · GitHub
The text was updated successfully, but these errors were encountered: