This commit is contained in:
SaladDay
2025-10-29 17:16:37 +00:00
2 changed files with 44 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ from agentuniverse.base.config.configer import Configer
from agentuniverse.base.config.custom_configer.default_llm_configer import DefaultLLMConfiger
from agentuniverse.base.config.custom_configer.custom_key_configer import CustomKeyConfiger
from agentuniverse.base.component.component_enum import ComponentEnum
from agentuniverse.base.util import character_util
from agentuniverse.base.util.monitor.monitor import Monitor
from agentuniverse.base.util.system_util import get_project_root_path, is_api_key_missing, \
is_system_builtin, find_default_llm_config
@@ -64,6 +65,7 @@ class AgentUniverse(object):
"""Start the agentUniverse framework.
"""
character_util.show_au_start_banner()
# get default config path
project_root_path = get_project_root_path()
sys.path.append(str(project_root_path.parent))

View File

@@ -0,0 +1,42 @@
# !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Time : 2025/10/28 12:17
# @Author : jerry.zzw
# @Email : jerry.zzw@antgroup.com
# @FileName: character_util.py
def show_au_start_banner():
python_art_text = f"""
╔═════════════════════════════════════════════════════════╗
║ █ █ █▀▀ █ █▀▀ █▀█ █▄█ █▀▀ ▀█▀ █▀█ ║
║ █▄█ █▀▀ █ █ █ █ █ █ █▀▀ █ █ █ ║
║ ▀ ▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀ ║
║ █▀█ █▀▀ █▀▀ █▀█ ▀█▀ █ █ █▀█ ▀█▀ █ █ █▀▀ █▀▄ █▀▀ █▀▀ ║
║ █▀█ █ █ █▀▀ █ █ █ █ █ █ █ █ █ █ █▀▀ █▀▄ ▀▀█ █▀▀ ║
║ ▀ ▀ ▀▀▀ ▀▀▀ ▀ ▀ ▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀ ║
╚═════════════════════════════════════════════════════════╝
"""
blue_colors = [33]
print_gradient_text(python_art_text, blue_colors)
def print_gradient_text(text, colors_range):
length = len(text)
result = []
for i, char in enumerate(text):
if length > 1:
color_index = int((i / (length - 1)) * (len(colors_range) - 1))
else:
color_index = 0
color_code = colors_range[min(color_index, len(colors_range) - 1)]
result.append(f"\033[38;5;{color_code}m{char}")
print(''.join(result) + "\033[0m")
if __name__ == "__main__":
show_au_start_banner()