Stevenic / agentm-py

A library of "Micro Agents" that make it easy to add reliable intelligence to any application.
MIT License
8 stars 3 forks source link

[Subtask] Replace tokenCounter with tiktoken #6

Closed debuggerone closed 2 months ago

debuggerone commented 2 months ago

Subtask Overview

This subtask involves replacing the JavaScript tokenCounter function with the tiktoken library in Python for managing tokenization and token counting during the AgentM Python migration.

Tasks

Acceptance Criteria

Stevenic commented 2 months ago

As an FYI... I don't have any components that use tokenCounter() yet other then textSplitter() but there's nothing that uses textSplitter(). There will likely be Micro Agents coming that do but not yet so I'd just say this is a lower priority support wise.

debuggerone commented 2 months ago

I just wanted to have a functionality that prevents running into rate limits - which is pretty painful to debug if you are new to the model usage - and I am pretty sure the limits will hit hard where I am going to use it.

debuggerone commented 2 months ago

After a couple of hours of sleep I think you are right.. let's not over engineer this. Will throw it out now and just keep it simple and then release a system that utilizes it in an abstract layer - with a couple of systems or a plugin system..

After all it's micro agents with tiny prompts

debuggerone commented 2 months ago

removed the database functionality