Playing with color

This commit is contained in:
Dita Aji Pratama 2026-05-12 08:52:57 +07:00
parent a83198303f
commit 2bdfe52abb

View File

@ -4,6 +4,10 @@ from llm_client import LLMClient
from tools import coder
from scripts import gadget
TEXT_COLOR_YELLOW = '\033[93m'
TEXT_COLOR_GREEN = '\033[92m'
TEXT_COLOR_RESET = '\033[0m'
tools_definition = [
gadget.tools_mapping( coder.schema_read_file, coder.read_file ),
gadget.tools_mapping( coder.schema_write_file, coder.write_file ),
@ -163,9 +167,9 @@ def main():
print("No query provided.")
return
messages = [{"role": "system", "content": gadget.build_system_prompt(tools_definition)}]
print("Thinking...")
print(f"{TEXT_COLOR_YELLOW}Thinking...{TEXT_COLOR_RESET}")
final_answer, messages = agent_loop(user_query, messages, llm_client)
print("\nFinal Answer:")
print(f"\n{TEXT_COLOR_GREEN}Final Answer:{TEXT_COLOR_RESET}")
print(final_answer)
return
@ -179,9 +183,9 @@ def main():
if messages is None:
messages = [{"role": "system", "content": gadget.build_system_prompt(tools_definition)}]
print("Thinking...")
print(f"{TEXT_COLOR_YELLOW}Thinking...{TEXT_COLOR_RESET}")
final_answer, messages = agent_loop(user_query, messages, llm_client)
print("\nFinal Answer:")
print(f"\n{TEXT_COLOR_GREEN}Final Answer:{TEXT_COLOR_RESET}")
print(final_answer)