/
githubmirror
/
Multi-GPT
Обзор
Документация
Войти
/
githubmirror
/
Multi-GPT
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
multigpt/multi_prompt_generator.py
32 строки
1 KB
lukas
refactored code, implemented gpt-based smart selection to intelligently select next participant in discussion, fixed some bugs, added chat only mode, tweaked agent behavior to be less collaborative, added behavioral traits for each agent
18 апр 2023, 08:37
18 апр 2023, 08:37
8b9ce73
Код
Авторство
О чём код?
from colorama import Fore from autogpt.logs import logger from autogpt.promptgenerator import PromptGenerator from autogpt.setup import prompt_user from autogpt.utils import clean_input class MultiPromptGenerator(PromptGenerator): def __init__(self, cfg) -> None: """ Initialize the MultiPromptGenerator object with empty lists of constraints, commands, resources, and performance evaluations. This is identical to the PromptGeneratorClass, except that text/speak are different for these agents. """ super().__init__() self.response_format = { "thoughts": { "text": "Thoughts you keep to yourself. They are NOT shared with your team.", "reasoning": "reasoning", "plan": "- short bulleted\n- list that conveys\n- long-term plan", "criticism": "constructive self-criticism", "speak": "Thoughts you say out loud. They ARE shared with your team.", }, "command": {"name": "command name", "args": {"arg name": "value"}}, } self.cfg = cfg def construct_prompt(self) -> str: # TODO MAKE USE OF THIS INSTEAD OF construct_prompt IN prompt.py pass