Can the cost of each request be sent back in the response synchronously? #684
Replies: 4 comments
-
Hey Yokesh GK the cost is computed after the request is completed as a post processing step, this is so that the response is not blocked |
Beta Was this translation helpful? Give feedback.
-
Actually our team needs to generate a cost report for the prompts we use and to achieve this I need to save them in our DB |
Beta Was this translation helpful? Give feedback.
-
It's not computed synchronously Yokesh GK , for computing the cost, there is a service which tokenizes the text and then calculates the cost, it needs to be non-blocking, |
Beta Was this translation helpful? Give feedback.
-
Discussion extracted from: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Actually I see the cost for the each prompts I made in my dashboard and I want the same in the final result of the chat/completions response along with the usage details
But I see that is not available in that endpoint as well as in other endpoints too. So I kindly request you guys to help me with this
Beta Was this translation helpful? Give feedback.
All reactions