mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-06 14:54:40 +01:00
Unbreak AutoGPT
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
from math import ceil, floor
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from autogpt.core.planning import LanguageModelPrompt
|
||||
if TYPE_CHECKING:
|
||||
from autogpt.core.planning import LanguageModelPrompt
|
||||
|
||||
SEPARATOR_LENGTH = 42
|
||||
|
||||
|
||||
def dump_prompt(prompt: LanguageModelPrompt) -> str:
|
||||
def dump_prompt(prompt: "LanguageModelPrompt") -> str:
|
||||
def separator(text: str):
|
||||
half_sep_len = (SEPARATOR_LENGTH - 2 - len(text)) / 2
|
||||
return f"{floor(half_sep_len)*'-'} {text.upper()} {ceil(half_sep_len)*'-'}"
|
||||
|
||||
Reference in New Issue
Block a user