From 915aed17d11f08d5d5d1e539ed37f7c3b9afdfdd Mon Sep 17 00:00:00 2001 From: liangxinbing <1580466765@qq.com> Date: Sun, 9 Mar 2025 22:27:20 +0800 Subject: [PATCH] update logo and format code --- CODE_OF_CONDUCT.md | 2 +- README.md | 2 +- README_zh.md | 2 +- examples/readme.md | 6 ++++-- pytest.ini | 2 +- run_flow.py | 12 +++++++----- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f87d0ba..42eb10c 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -159,4 +159,4 @@ For answers to common questions about this code of conduct, see the FAQ at [FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations \ No newline at end of file +[translations]: https://www.contributor-covenant.org/translations diff --git a/README.md b/README.md index 821012e..2bbf50d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ English | [็ฎ€ไฝ“ไธญๆ–‡](README_zh.md) Discord Follow

-# OpenManus ๐Ÿ‘‹ +# ๐Ÿ‘‹ OpenManus Manus is incredible, but OpenManus can achieve any ideas without an Invite Code ๐Ÿ›ซ! diff --git a/README_zh.md b/README_zh.md index 411e4f9..8ff9a6c 100644 --- a/README_zh.md +++ b/README_zh.md @@ -4,7 +4,7 @@ Discord Follow

-# OpenManus ๐Ÿ‘‹ +# ๐Ÿ‘‹ OpenManus Manus ้žๅธธๆฃ’๏ผŒไฝ† OpenManus ๆ— ้œ€้‚€่ฏท็ ๅณๅฏๅฎž็Žฐไปปไฝ•ๅˆ›ๆ„ ๐Ÿ›ซ๏ผ diff --git a/examples/readme.md b/examples/readme.md index a417661..e18592e 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -1,5 +1,7 @@ # Examples -We put some examples in the `examples` directory. All the examples use the same prompt as [Manus](https://manus.im/?utm_source=ai-bot.cn). + +We put some examples in the `examples` directory. All the examples use the same prompt +as [Manus](https://manus.im/?utm_source=ai-bot.cn). The Model we use is `claude3.5`. @@ -11,4 +13,4 @@ I need a 7-day Japan itinerary for April 15-23 from Seattle, with a $2500-5000 b **preview**๏ผš ![alt text](./pictures/japan-travel-plan-1.png) -![alt text](./pictures/japan-travel-plan-2.png) \ No newline at end of file +![alt text](./pictures/japan-travel-plan-2.png) diff --git a/pytest.ini b/pytest.ini index 465d383..4bbeada 100644 --- a/pytest.ini +++ b/pytest.ini @@ -11,4 +11,4 @@ log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno log_cli_date_format = %Y-%m-%d %H:%M:%S # Make sure asyncio works properly -asyncio_mode = auto \ No newline at end of file +asyncio_mode = auto diff --git a/run_flow.py b/run_flow.py index e9f6913..3a5c8ba 100644 --- a/run_flow.py +++ b/run_flow.py @@ -27,20 +27,22 @@ async def run_flow(): logger.warning("Skipping empty prompt.") continue logger.warning("Processing your request...") - + try: start_time = time.time() result = await asyncio.wait_for( - flow.execute(prompt), - timeout=3600 # 60 minute timeout for the entire execution + flow.execute(prompt), + timeout=3600, # 60 minute timeout for the entire execution ) elapsed_time = time.time() - start_time logger.info(f"Request processed in {elapsed_time:.2f} seconds") logger.info(result) except asyncio.TimeoutError: logger.error("Request processing timed out after 1 hour") - logger.info("Operation terminated due to timeout. Please try a simpler request.") - + logger.info( + "Operation terminated due to timeout. Please try a simpler request." + ) + except KeyboardInterrupt: logger.info("Operation cancelled by user.") except Exception as e: