-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log LLM costs and info #108
Conversation
c.execute(f"PRAGMA table_info{_llm_calls}") | ||
columns = [row[1] for row in c.fetchall()] | ||
if "llm_info" not in columns: | ||
c.execute(f"ALTER TABLE {_llm_calls} ADD COLUMN llm_info TEXT DEFAULT '{{}}'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make the column name configurable from the args of the script. This way we can reuse it next time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it will work, cause you need default values. I would not ever-generalize this tool, it's a good starting point, but it is easier to edit than to make fully reusable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
3 tests fail in
gaia_planner
, same tests fail in this branchlooks like this: