/
githubmirror
/
gpt-engineer
Обзор
Документация
Войти
/
githubmirror
/
gpt-engineer
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
gpt_engineer/core/base_agent.py
31 строка
1015 B
Theo McCabe
almost all tests passing. Vision model has some issues with the prompt though
19 мар 2024, 22:07
19 мар 2024, 22:07
43fe516
Код
Авторство
О чём код?
""" Base Agent Module This module provides an abstract base class for an agent that interacts with code. It defines the interface for agents capable of initializing and improving code based on a given prompt. Implementations of this class are expected to provide concrete methods for these actions. Classes: BaseAgent: Abstract base class for an agent that interacts with code. """ from abc import ABC, abstractmethod from gpt_engineer.core.files_dict import FilesDict from gpt_engineer.core.prompt import Prompt class BaseAgent(ABC): """ Abstract base class for an agent that interacts with code. Defines the interface for agents capable of initializing and improving code based on a given prompt. Implementations of this class are expected to provide concrete methods for these actions. """ @abstractmethod def init(self, prompt: Prompt) -> FilesDict: pass @abstractmethod def improve(self, files_dict: FilesDict, prompt: Prompt) -> FilesDict: pass