Class AzureOpenAiChatResponseMetadata
java.lang.Object
org.springframework.ai.azure.openai.metadata.AzureOpenAiChatResponseMetadata
- All Implemented Interfaces:
ChatResponseMetadata,ResponseMetadata
ChatResponseMetadata implementation for
Microsoft Azure OpenAI Service.- Since:
- 0.7.1
- Author:
- John Blum
- See Also:
-
Field Summary
FieldsFields inherited from interface org.springframework.ai.chat.metadata.ChatResponseMetadata
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAzureOpenAiChatResponseMetadata(String id, AzureOpenAiUsage usage, PromptMetadata promptMetadata) -
Method Summary
Modifier and TypeMethodDescriptionfrom(com.azure.ai.openai.models.ChatCompletions chatCompletions, PromptMetadata promptFilterMetadata) getId()getUsage()Returns AI provider specific metadata on API usage.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.ai.chat.metadata.ChatResponseMetadata
getRateLimit
-
Field Details
-
AI_METADATA_STRING
- See Also:
-
-
Constructor Details
-
AzureOpenAiChatResponseMetadata
protected AzureOpenAiChatResponseMetadata(String id, AzureOpenAiUsage usage, PromptMetadata promptMetadata)
-
-
Method Details
-
from
public static AzureOpenAiChatResponseMetadata from(com.azure.ai.openai.models.ChatCompletions chatCompletions, PromptMetadata promptFilterMetadata) -
getId
-
getUsage
Description copied from interface:ChatResponseMetadataReturns AI provider specific metadata on API usage.- Specified by:
getUsagein interfaceChatResponseMetadata- Returns:
- AI provider specific metadata on API usage.
- See Also:
-
getPromptMetadata
- Specified by:
getPromptMetadatain interfaceChatResponseMetadata
-
toString
-