https://discord.gg/botpress logo
AI Spend too high
# 🤝help
m
I understand that Botpress makes a ton of AI calls for each message. I was wondering if there was a way to decrease the amount of tokens? I'm just testing a few bots, the messages are short usually but the AI spend is closing in on 15USD already. I've used other platforms before and the usage wasn't this excessive. Any solutions?
p
What instructions and cards are you using? For the most part, the use of ANs with thick instructions is what will require the most tokens. You can also disable the connor and improvements integrations that analyze the conversation and allow response improvement, if you don't need them.
p
I was having the same problem - first I changed the agent models I was using from GPT-4o to Gemini 2.0 Flash which seemed to be cheaper. Then I turned off the Summary and Knowledge agent because I was told my bot in particular (pretty much just a Q&A bot) doesn't need them. That seems to have helped a good bit too.
m
A couple of autonomous nodes. But it uses AI for other stuff too right? Will it help if I keep the autonomous nodes small and leave the rest of the data in the vector db? (Also, another question - I don't see any settings for the vector db)
I'm using 4o-mini and 4.1-mini. As for turning off agents, I will do that for this project.
r
@prehistoric-airplane-85682 how to increase my AI spend limit, I do it once from 5 - 10 usd, but it is disable now, I can't do it anymore
p
If you can delegate some tasks to standard nodes' workflows, I would recommend doing that. If you can use less tokens aka a shorter prompt to achieve the same result, also do so. And in terms of vectore DB, it represents yourKnowledge Base storage space. The KB is queried by the knowledge agent which uses AI spend so I don't know that it would end up diminishing your total. Happy Bot Building!
Can you show screenshots of what you see and also provide your workspace id?