Files
gpt-pilot/core/proc/exec_log.py
Senko Rasic 5b474ccc1f merge gpt-pilot 0.2 codebase
This is a complete rewrite of the GPT Pilot core, from the ground
up, making the agentic architecture front and center, and also
fixing some long-standing problems with the database architecture
that weren't feasible to solve without breaking compatibility.

As the database structure and config file syntax have changed,
we have automatic imports for projects and current configs,
see the README.md file for details.

This also relicenses the project to FSL-1.1-MIT license.
2024-05-22 21:42:25 +02:00

22 lines
1.1 KiB
Python

from datetime import datetime
from typing import Optional
from pydantic import BaseModel, Field
class ExecLog(BaseModel):
started_at: datetime = Field(default_factory=datetime.now)
duration: float = Field(description="The duration of the command/process run in seconds")
cmd: str = Field(description="The full command (as executed in the shell)")
cwd: str = Field(description="The working directory for the command (relative to project root)")
env: dict = Field(description="The environment variables for the command")
timeout: Optional[float] = Field(description="The command timeout in seconds (or None if no timeout)")
status_code: Optional[int] = Field(description="The command return code, or None if there was a timeout")
stdout: str = Field(description="The command standard output")
stderr: str = Field(description="The command standard error")
analysis: str = Field(description="The result analysis as performed by the LLM")
success: bool = Field(description="Whether the command was successful")
__all__ = ["ExecLog"]