Integrations
Azure OpenAI
APIs
Chat Completion

Azure OpenAI - Chat Completion

Leverage advanced AI models from Azure OpenAI to perform complex tasks such as categorization, analysis, summarization, or decision support.

For more information on Azure OpenAI's API, see Azure OpenAI Documentation (opens in a new tab).

SDK Import:

from admyral.actions import azure_openai_chat_completion

Arguments:

Argument NameDescriptionRequired
Prompt promptThe input prompt to use for generating the chat completion.Yes
Top P top_pValue between 0 and 1 for nucleus sampling. Only tokens with the top P probability mass are considered. Recommended to tweak this or temperature, but not both.-
Temperature temperatureSampling temperature, between 0 and 2. Higher values (e.g., 0.8) increase randomness, while lower values (e.g., 0.2) make output more deterministic. Recommended to adjust this or Top P, but not both.-
Stop Tokens stop_tokensA list of tokens to stop the completion upon encountering.-

Returns

A string.

Required Secrets

Secret PlaceholderDescription
AZURE_OPENAI_SECRETAzure OpenAI secret. See Abnormal Security setup

SDK Example

response = azure_openai_chat_completion(
	prompt="Why is the ocean salty?",
	secrets={
		"AZURE_OPENAI_SECRET": "my_azure_openai_secret"
	}
)