black formatting

pull/181/head
evelynmitchell 1 year ago
parent 36a641b5f4
commit d1144ec4fc

@ -185,9 +185,11 @@ def build_extra_kwargs(
if field_name in extra_kwargs:
raise ValueError(f"Found {field_name} supplied twice.")
if field_name not in all_required_field_names:
warnings.warn(f"""WARNING! {field_name} is not default parameter.
warnings.warn(
f"""WARNING! {field_name} is not default parameter.
{field_name} was transferred to model_kwargs.
Please confirm that {field_name} is what you intended.""")
Please confirm that {field_name} is what you intended."""
)
extra_kwargs[field_name] = values.pop(field_name)
invalid_model_kwargs = all_required_field_names.intersection(

@ -168,10 +168,8 @@ class Dalle3:
# Handling exceptions and printing the errors details
print(
colored(
(
f"Error running Dalle3: {error} try optimizing your api"
" key and or try again"
),
f"Error running Dalle3: {error} try optimizing your api"
" key and or try again",
"red",
)
)
@ -233,10 +231,8 @@ class Dalle3:
except (Exception, openai.OpenAIError) as error:
print(
colored(
(
f"Error running Dalle3: {error} try optimizing your api"
" key and or try again"
),
f"Error running Dalle3: {error} try optimizing your api"
" key and or try again",
"red",
)
)
@ -310,10 +306,8 @@ class Dalle3:
except Exception as error:
print(
colored(
(
f"Error running Dalle3: {error} try optimizing"
" your api key and or try again"
),
f"Error running Dalle3: {error} try optimizing"
" your api key and or try again",
"red",
)
)

@ -291,10 +291,8 @@ class HuggingfaceLLM:
except Exception as e:
print(
colored(
(
"HuggingfaceLLM could not generate text because of"
f" error: {e}, try optimizing your arguments"
),
"HuggingfaceLLM could not generate text because of"
f" error: {e}, try optimizing your arguments",
"red",
)
)

@ -140,10 +140,8 @@ class SSD1B:
# Handling exceptions and printing the errors details
print(
colored(
(
f"Error running SSD1B: {error} try optimizing your api"
" key and or try again"
),
f"Error running SSD1B: {error} try optimizing your api"
" key and or try again",
"red",
)
)
@ -228,10 +226,8 @@ class SSD1B:
except Exception as error:
print(
colored(
(
f"Error running SSD1B: {error} try optimizing"
" your api key and or try again"
),
f"Error running SSD1B: {error} try optimizing"
" your api key and or try again",
"red",
)
)

@ -137,7 +137,7 @@ class Flow:
"""
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:
Features:
* Interactive, AI generates, then user input
* Message history and performance history fed -> into context -> truncate if too long
@ -489,10 +489,8 @@ class Flow:
except Exception as error:
print(
colored(
(
"Error activating autonomous agent. Try optimizing your"
" parameters..."
),
"Error activating autonomous agent. Try optimizing your"
" parameters...",
"red",
)
)
@ -652,7 +650,7 @@ class Flow:
while attempt < self.retry_attempts:
try:
response = self.llm(
task**kwargs,
task ** kwargs,
)
if self.interactive:
print(f"AI: {response}")

@ -385,11 +385,9 @@ class SequentialWorkflow:
except Exception as e:
print(
colored(
(
f"Error initializing the Sequential workflow: {e} try"
" optimizing your inputs like the flow class and task"
" description"
),
f"Error initializing the Sequential workflow: {e} try"
" optimizing your inputs like the flow class and task"
" description",
"red",
attrs=["bold", "underline"],
)

Loading…
Cancel
Save