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] Develop error handler in Python #7

Closed debuggerone closed 2 months ago

debuggerone commented 2 months ago

Subtask Overview

This subtask focuses on implementing a robust error handling mechanism in Python for the AgentM migration. The error handler should log errors to .var/log/error and manage access controls effectively.

Tasks

Acceptance Criteria

Stevenic commented 2 months ago

So developers are very bad about handling exceptions in JavaScript and services like OpenAI will throw some errors and return others. I elected to just return all errors which is why I have a standard AgentResponse class that has { completed, value, error } fields. I don't have an overly strong opinion about throwing versus returning errors other then you should just be consistent...

debuggerone commented 2 months ago

I'll make that configurable in install process

debuggerone commented 2 months ago

Errors are now simply output but also logged