mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Merge branch 'master' of https://github.com/Torantulino/Auto-GPT
This commit is contained in:
@@ -31,6 +31,7 @@ class Config(metaclass=Singleton):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.debug = False
|
||||||
self.continuous_mode = False
|
self.continuous_mode = False
|
||||||
self.speak_mode = False
|
self.speak_mode = False
|
||||||
# TODO - make these models be self-contained, using langchain, so we can configure them once and call it good
|
# TODO - make these models be self-contained, using langchain, so we can configure them once and call it good
|
||||||
@@ -110,3 +111,6 @@ class Config(metaclass=Singleton):
|
|||||||
|
|
||||||
def set_pinecone_region(self, value: str):
|
def set_pinecone_region(self, value: str):
|
||||||
self.pinecone_region = value
|
self.pinecone_region = value
|
||||||
|
|
||||||
|
def set_debug_mode(self, value: bool):
|
||||||
|
self.debug = value
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ def fix_and_parse_json(json_str: str, try_to_fix_with_gpt: bool = True):
|
|||||||
if try_to_fix_with_gpt:
|
if try_to_fix_with_gpt:
|
||||||
print(f"Warning: Failed to parse AI output, attempting to fix.\n If you see this warning frequently, it's likely that your prompt is confusing the AI. Try changing it up slightly.")
|
print(f"Warning: Failed to parse AI output, attempting to fix.\n If you see this warning frequently, it's likely that your prompt is confusing the AI. Try changing it up slightly.")
|
||||||
# Now try to fix this up using the ai_functions
|
# Now try to fix this up using the ai_functions
|
||||||
ai_fixed_json = fix_json(json_str, json_schema, False)
|
ai_fixed_json = fix_json(json_str, json_schema, cfg.debug)
|
||||||
if ai_fixed_json != "failed":
|
if ai_fixed_json != "failed":
|
||||||
return json.loads(ai_fixed_json)
|
return json.loads(ai_fixed_json)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -276,6 +276,10 @@ def parse_arguments():
|
|||||||
print_to_console("GPT3.5 Only Mode: ", Fore.GREEN, "ENABLED")
|
print_to_console("GPT3.5 Only Mode: ", Fore.GREEN, "ENABLED")
|
||||||
cfg.set_smart_llm_model(cfg.fast_llm_model)
|
cfg.set_smart_llm_model(cfg.fast_llm_model)
|
||||||
|
|
||||||
|
if args.debug:
|
||||||
|
print_to_console("Debug Mode: ", Fore.GREEN, "ENABLED")
|
||||||
|
cfg.set_debug_mode(True)
|
||||||
|
|
||||||
|
|
||||||
# TODO: fill in llm values here
|
# TODO: fill in llm values here
|
||||||
|
|
||||||
@@ -306,7 +310,7 @@ while True:
|
|||||||
user_input,
|
user_input,
|
||||||
full_message_history,
|
full_message_history,
|
||||||
memory,
|
memory,
|
||||||
cfg.fast_token_limit) # TODO: This hardcodes the model to use GPT3.5. Make this an argument
|
cfg.fast_token_limit, cfg.debug) # TODO: This hardcodes the model to use GPT3.5. Make this an argument
|
||||||
|
|
||||||
# Print Assistant thoughts
|
# Print Assistant thoughts
|
||||||
print_assistant_thoughts(assistant_reply)
|
print_assistant_thoughts(assistant_reply)
|
||||||
|
|||||||
Reference in New Issue
Block a user