transitive-bullshit / agentic

AI agent stdlib that works with any LLM and TypeScript AI SDK.
https://agentic.so
MIT License
16.38k stars 2.14k forks source link

Token Usage Counter? #579

Closed HarveyLijh closed 4 months ago

HarveyLijh commented 1 year ago

Describe the feature

First of all, awesome tool! Thanks for the dedicated work! I've been looking into Issues tickets and code, but still wondering if there is a way I can counter the token usage of each request I made to openAI? I saw an import and usage of tiktoken, but it seems irrelevant to usage counting. Cheers

h1xy commented 1 year ago

I have the same needed.

transitive-bullshit commented 4 months ago

This project is undergoing a major revamp; closing out old issues as part of the prep process.

The chatgpt package is pretty outdated at this point. I recommend that you use the openai package or the openai-fetch package instead.