|
|
@ -137,7 +137,7 @@ class Flow:
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Flow is the structure that provides autonomy to any llm in a reliable and effective fashion.
|
|
|
|
Flow is the structure that provides autonomy to any llm in a reliable and effective fashion.
|
|
|
|
The flow structure is designed to be used with any llm and provides the following features:
|
|
|
|
The flow structure is designed to be used with any llm and provides the following features:
|
|
|
|
|
|
|
|
|
|
|
|
Features:
|
|
|
|
Features:
|
|
|
|
* Interactive, AI generates, then user input
|
|
|
|
* Interactive, AI generates, then user input
|
|
|
|
* Message history and performance history fed -> into context -> truncate if too long
|
|
|
|
* Message history and performance history fed -> into context -> truncate if too long
|
|
|
@ -489,10 +489,8 @@ class Flow:
|
|
|
|
except Exception as error:
|
|
|
|
except Exception as error:
|
|
|
|
print(
|
|
|
|
print(
|
|
|
|
colored(
|
|
|
|
colored(
|
|
|
|
(
|
|
|
|
"Error activating autonomous agent. Try optimizing your"
|
|
|
|
"Error activating autonomous agent. Try optimizing your"
|
|
|
|
" parameters...",
|
|
|
|
" parameters..."
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
"red",
|
|
|
|
"red",
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -652,7 +650,7 @@ class Flow:
|
|
|
|
while attempt < self.retry_attempts:
|
|
|
|
while attempt < self.retry_attempts:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
response = self.llm(
|
|
|
|
response = self.llm(
|
|
|
|
task**kwargs,
|
|
|
|
task ** kwargs,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if self.interactive:
|
|
|
|
if self.interactive:
|
|
|
|
print(f"AI: {response}")
|
|
|
|
print(f"AI: {response}")
|
|
|
|