ragas
ragas copied to clipboard
feat: Add utility to extract token usage from Azure AI-compatible LLM results
Description:
This PR adds a helper function to extract token usage from LLMResult or ChatResult, using the Azure AI response format returned by LangChain.
Key Changes:
- Added
get_token_usage_for_azure_aiutility, supporting Azure AI's token usage format as returned by LangChain. - Implemented unit tests to validate behavior.