Merge pull request #695 from cryptidv/master

Changed occurances of 'cfg.debug_mode'  to 'cfg.debug'
This commit is contained in:
Toran Bruce Richards
2023-04-10 14:35:51 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ def chat_with_ai(
relevant_memory = permanent_memory.get_relevant(str(full_message_history[-5:]), 10)
if cfg.debug_mode:
if cfg.debug:
print('Memory Stats: ', permanent_memory.get_stats())
next_message_to_add_index, current_tokens_used, insertion_index, current_context = generate_context(
@@ -110,7 +110,7 @@ def chat_with_ai(
# assert tokens_remaining >= 0, "Tokens remaining is negative. This should never happen, please submit a bug report at https://www.github.com/Torantulino/Auto-GPT"
# Debug print the current context
if cfg.debug_mode:
if cfg.debug:
print(f"Token limit: {token_limit}")
print(f"Send Token Count: {current_tokens_used}")
print(f"Tokens remaining for response: {tokens_remaining}")

View File

@@ -91,7 +91,7 @@ def fix_json(json_str: str, schema: str) -> str:
result_string = call_ai_function(
function_string, args, description_string, model=cfg.fast_llm_model
)
if cfg.debug_mode:
if cfg.debug:
print("------------ JSON FIX ATTEMPT ---------------")
print(f"Original JSON: {json_str}")
print("-----------")