Hello 杜亚磊,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to affirm if azure openai support predicted outputs.
Yes, Azure OpenAI Service does support features related to predicted outputs, especially structured outputs and reproducible outputs.
Structured outputs allow you to define specific schemas for the generated content. This ensures that the output adheres to a predefined structure, making it useful for tasks like function calling, extracting structured data, and building complex workflows.
NOTE: Use structured outputs when you need the generated content to follow a specific format or schema. This can help in automating tasks and integrating AI-generated content into larger systems. - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs Sample code:
import openai
response = openai.Completion.create(
engine="davinci-codex",
prompt="Generate a JSON object with name, age, and email fields",
max_tokens=50,
n=1,
stop=None,
temperature=0.5
)
print(response.choices[0].text)
Reproducible outputs help in generating more deterministic results. By using parameters like seed
and system_fingerprint
, you can ensure that the outputs are consistent across multiple runs.
NOTE: Use reproducible outputs when you need consistent results for tasks such as testing, debugging, or when the same output is required across different instances. - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/reproducible-output Sample code:
import openai
response = openai.Completion.create(
engine="davinci-codex",
prompt="Translate the following English text to French: 'Hello, how are you?'",
max_tokens=60,
n=1,
stop=None,
temperature=0.5,
seed=42
)
print(response.choices[0].text)
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Pease don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.