[Issue]: how to calculate the cost of each workflow
Describe the issue
I print the response in graph_extractor.py, however it didn't print the cost.
response = await self._llm( self._extraction_prompt, variables={ **prompt_variables, self._input_text_key: text, }, )
Steps to reproduce
No response
GraphRAG Config Used
No response
Logs and screenshots
No response
Additional Information
- GraphRAG Version:
- Operating System:
- Python Version:
- Related Issues:
I have intergrate the graphRAG with prompt flow trace function, and get the total token count. The LLM call count is :
chunk Number * 3 + coummunity Number + entity Number + ( option: Claim Number)
We are working on an injectable logger to help assess costs. In the meantime, here is a new article discussing GraphRAG costs: https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/graphrag-costs-explained-what-you-need-to-know/ba-p/4207978
Closing this as a duplicate of #581