Package com.azure.ai.openai.models
Class NonAzureOpenAIKeyCredential
java.lang.Object
com.azure.ai.openai.models.NonAzureOpenAIKeyCredential
Non-Azure OpenAI API keys credential class for accepting non-Azure OpenAI API key credential string.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a non-Azure OpenAI API key credential. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Retrieves the key associated to this credential.Update the OpenAI API key value.
-
Constructor Details
-
NonAzureOpenAIKeyCredential
Create a non-Azure OpenAI API key credential.- Parameters:
key- non-Azure OpenAI API key.- Throws:
NullPointerException- If key is null.IllegalArgumentException- If key is an empty string.
-
-
Method Details
-
getKey
Retrieves the key associated to this credential.- Returns:
- The key being used to authorize requests.
-
update
Update the OpenAI API key value.- Parameters:
key- The OpenAI API key value.- Returns:
- the object itself.
-