TypeChat icon indicating copy to clipboard operation
TypeChat copied to clipboard

Get API-Information on usage etc

Open intuity-hans opened this issue 1 year ago • 0 comments

From my understanding you currently only get the answer and a success flag back. For me it would be quite interesting to also get information on tokens used etc (which OpenAI provides for example). Is there a way to get that information out or does this need modification in the code? Would be happy to support, just need a little guidance on where to start.

This is the information on usage you get back when using the openAI-API

"usage":{
      "prompt_tokens":13,
      "completion_tokens":7,
      "total_tokens":20
   },

intuity-hans avatar Jul 28 '23 14:07 intuity-hans