正解:B
When interacting with the Azure OpenAI REST API, requests and responses are structured using the JSON format. According to the Microsoft Learn documentation on the Azure OpenAI REST API, JSON is the required format for sending prompts, configuration parameters (such as temperature, max_tokens, or top_p), and metadata to the API endpoint.
A typical request to an Azure OpenAI endpoint (for example, /openai/deployments/{model-name}/chat
/completions?api-version=2024-02-01) includes a JSON body similar to the following:
{
"messages": [
{"role": "system", "content": "You are an assistant."},
{"role": "user", "content": "Write a JavaScript function to add two numbers."}
],
"max_tokens": 200,
"temperature": 0.7
}
This JSON format allows for structured data exchange between the client and the server, ensuring that key- value pairs are properly parsed by the API.
* Option A (CSV): Used for storing tabular data, not suitable for API communication.
* Option C (XML): Though historically used in web services, Microsoft's modern APIs, including Azure OpenAI, rely on JSON.
* Option D (YAML): Common in configuration files but not for REST API payloads.
Therefore, per official Microsoft documentation and the AI-900 study guide, the correct and verified answer is B. JSON, as it is the standard format required when sending requests to the Azure OpenAI REST API endpoint.