skip to Main Content

How can I write a POST request for Azure OpenAI that uses structured output?

I want to write a POST request for Azure OpenAI that uses structured output. https://azure.microsoft.com/en-us/blog/announcing-a-new-openai-feature-for-developers-on-azure/ says: Here’s an example API call to illustrate how to use Structured Outputs: { "model": "gpt-4o-2024-08-06", "prompt": "Generate a customer support response", "structured_output": { "schema":…

VIEW QUESTION

Flutter – Type 'String' can't be assigned to the parameter type 'Map<String, dynamic>? Tried some solutions but still Stuck

Here is my code: Map<String, dynamic>? myMap = { 'conversationId': iD, 'type': 'text', 'data': _controller.text.toString(), 'msgLength':_controller.text.length, 'senderId': Provider.of( context,listen: false).id, 'createdOn': 190823, 'messageState': 'delivered', 'isDeleted': 0, 'id': 3048, }; String encoded = json.encode(myMap); // Make the POST request and wait…

VIEW QUESTION
Back To Top
Search