mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
fix: correct default model (gpt-4o), correct token counts, and correct TaskOutput attributes (added agent) (#749)
* fix: 'from datetime import datetime for logging' to print the timestamp * fix: correct default model (gpt-4o), correct token counts, and correct TaskOutput attributes (added agent) * test: verify Task callback data is an instance of TaskOutput
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from datetime import datetime
|
||||
from crewai.utilities.printer import Printer
|
||||
|
||||
|
||||
@@ -13,6 +14,7 @@ class Logger:
|
||||
def log(self, level, message, color="bold_green"):
|
||||
level_map = {"debug": 1, "info": 2}
|
||||
if self.verbose_level and level_map.get(level, 0) <= self.verbose_level:
|
||||
timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
self._printer.print(f"[{timestamp}][{level.upper()}]: {message}", color=color)
|
||||
|
||||
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
self._printer.print(
|
||||
f"[{timestamp}][{level.upper()}]: {message}", color=color
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user