https://discord.gg/botpress logo
Autonomous node using so many tokens
# 🤝help
v
Hey team my autonomous node rn is taking so many tokens i am trying to solve this issue since a week to reduce the tokens i tried dividing the autonomous node within workflow but looks like it still sending complete conversation of all autonomonus node on each time.
@User You guys are my only shot 🙂 Please help
g
change your autonomous language model to gemini 2.0 and it wont really matter its dirt cheap
it wont be related to the autonomous node, more than likely the token usage is correlated with the size of your kb.
v
I am using sonnet 3.7 it's giving back with good reply but when i use gemini it's very basic to use
Just to have idea
i have created 3 automonous node
1 for decision + Random questions And 2 for sell and buy
But each time it is sending like 7k Tokens
per shot
Which is huge and for longer term very expensive to use
@gentle-policeman-89141
g
Mate I am not surprised if youre using sonnet 3.7, its bloody expensive
what is the problem with gemini?
p
The token usage also relates to your autonomous nodes prompts, you might want to optimize them.
v
Question if i have like 4-5 autonomous node in workflows is it sending all at once as system input?
g
each autonomous node takes a different prompt so split your prompt up accordingly.
v
So sonnet very good replying @gentle-policeman-89141 I tried gemini
g
but that prompt isnt rediculously long
you have to find a balance between price and responses then mate, if cost is more important use gemini or find another similar model. you can see the cost per million input and output tokens (basically words) in the settings on the left of the dropdown tab
or, use hugginface and import your own LM
v
And here a new road 🙂 can you give me some directions to this ? Any source of what i can ask from gpt specifically. OWN LM could be best option with all things already know
I would love to learn this wya
Monthly traffic is like 4.5k So need a solid thing for all conversation
g
are you asking how to import your own LM?
v
yes sir
Never tried just a quick direction is enough hopefully.
g
I myself have never done it, but you will need to go to the hub (purple button top right) install the huggingface integration, then either follow the instructions there (i dont know them or if theyre there) if there are no instructions go to the docs on the hugginface integration. you will need to create an account with huggingface. use gpt or something if you get stuck.
w
Autonomous nodes have a pretty long internal nodes, that's why even if your custom prompt isn't that long it will consume lots of tokens
v
So there is no solution to this? or any better way for what i am doing?
Gotcha i am checking it
w
As @gentle-policeman-89141 suggested, i'd recommend you to switch model, and to forget about claude 3.7 which is one of the most expensive non-reasoning models try gpt4.1 which is already almost 2times cheaper
b
where to change autonomous language model sir
@bulky-book-76027
Understood thanks alot guys @wooden-beard-40210 @gentle-policeman-89141 @prehistoric-airplane-85682 I will try all and let you know if this works
b
thank you
g
no stress brother