Skip to content

I had to press control C to cancel the running code. fix it. #975

@MervinPraison

Description

@MervinPraison
❯ python agentic_parallelisation.py
[01:24:36] INFO     [01:24:36] llm.py:1594 INFO Getting async response from                      llm.py:1594
                    gemini/gemini-2.5-flash-lite-preview-06-17                                              
           INFO     [01:24:36] llm.py:1594 INFO Getting async response from                      llm.py:1594
                    gemini/gemini-2.5-flash-lite-preview-06-17                                              
           INFO     [01:24:36] llm.py:1594 INFO Getting async response from                      llm.py:1594
                    gemini/gemini-2.5-flash-lite-preview-06-17                                              
/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/httpx/_models.py:408: DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
  headers, stream = encode_request(
/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/litellm/litellm_core_utils/streaming_handler.py:1701: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/
  obj_dict = processed_chunk.dict()
           INFO     [01:24:36] agent.py:1969 INFO Executing async tool: fetch_favorite_article agent.py:1969
                    with arguments: {}                                                                      
           INFO     [01:24:36] agent.py:1969 INFO Executing async tool: search_trending_kenya  agent.py:1969
                    with arguments: {}                                                                      
╭─────────────────────────────────── Tool Call ───────────────────────────────────╮
│ Agent ArticleAgent called function 'fetch_favorite_article' with arguments: {}  │
│ Function returned: Your favorite morning article: 'How to Start Your Day Right' │
╰─────────────────────────────────────────────────────────────────────────────────╯
           INFO     [01:24:36] agent.py:1969 INFO Executing async tool: fetch_twitter_feed     agent.py:1969
                    with arguments: {}                                                                      
╭─────────────────────────────────── Tool Call ───────────────────────────────────╮
│ Agent KenyaNewsAgent called function 'search_trending_kenya' with arguments: {} │
│ Function returned: Trending in Kenya: 'Kenya launches new tech hub in Nairobi'  │
╰─────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────── Tool Call ─────────────────────────────────╮
│ Agent TwitterAgent called function 'fetch_twitter_feed' with arguments: {} │
│ Function returned: Latest tweet: 'AI is transforming the world!'           │
╰────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.5s
╭────────────────────────────────────────────────── Task ──────────────────────────────────────────────────╮
│ You need to do the following task: Search for trending news in Kenya. Input data from previous tasks:.   │
│ Expected Output: Trending news in Kenya..                                                                │
│                                                                                                          │
│ Context:                                                                                                 │
│                                                                                                          │
│ Previous task fetch_article is not yet completed (status: in progress). Please provide only the final    │
│ result of your work. Do not add any conversation or extra explanation.                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────── Response ────────────────────────────────────────────────╮
│ Kenya launches new tech hub in Nairobi                                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.5s
╭────────────────────────────────────────────────── Task ──────────────────────────────────────────────────╮
│ You need to do the following task: Search for trending news in Kenya. Input data from previous tasks:.   │
│ Expected Output: Trending news in Kenya..                                                                │
│                                                                                                          │
│ Context:                                                                                                 │
│                                                                                                          │
│ Previous task fetch_article is not yet completed (status: in progress). Please provide only the final    │
│ result of your work. Do not add any conversation or extra explanation.                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────── Response ────────────────────────────────────────────────╮
│ Kenya launches new tech hub in Nairobi                                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.5s
╭────────────────────────────────────────────────── Task ──────────────────────────────────────────────────╮
│ You need to do the following task: Fetch the latest Twitter feed. Input data from previous tasks:.       │
│ Expected Output: Latest Twitter feed..                                                                   │
│                                                                                                          │
│ Context:                                                                                                 │
│                                                                                                          │
│ Previous task search_kenya_news is not yet completed (status: in progress). Please provide only the      │
│ final result of your work. Do not add any conversation or extra explanation.                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────── Response ────────────────────────────────────────────────╮
│ Latest tweet: 'AI is transforming the world!'                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.5s
╭────────────────────────────────────────────────── Task ──────────────────────────────────────────────────╮
│ You need to do the following task: Fetch the latest Twitter feed. Input data from previous tasks:.       │
│ Expected Output: Latest Twitter feed..                                                                   │
│                                                                                                          │
│ Context:                                                                                                 │
│                                                                                                          │
│ Previous task search_kenya_news is not yet completed (status: in progress). Please provide only the      │
│ final result of your work. Do not add any conversation or extra explanation.                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────── Response ────────────────────────────────────────────────╮
│ Latest tweet: 'AI is transforming the world!'                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.5s
╭────────────────────────────────────────────────── Task ──────────────────────────────────────────────────╮
│ You need to do the following task: Fetch the user's favorite morning article.. Expected Output: The      │
│ favorite morning article.. Please provide only the final result of your work. Do not add any             │
│ conversation or extra explanation.                                                                       │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────── Response ────────────────────────────────────────────────╮
│ Your favorite morning article: 'How to Start Your Day Right'                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.5s
╭────────────────────────────────────────────────── Task ──────────────────────────────────────────────────╮
│ You need to do the following task: Fetch the user's favorite morning article.. Expected Output: The      │
│ favorite morning article.. Please provide only the final result of your work. Do not add any             │
│ conversation or extra explanation.                                                                       │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────── Response ────────────────────────────────────────────────╮
│ Your favorite morning article: 'How to Start Your Day Right'                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
[01:24:37] INFO     [01:24:37] llm.py:795 INFO Getting response from                              llm.py:795
                    gemini/gemini-2.5-flash-lite-preview-06-17                                              
╭─ Agent Info ─────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                          │
│  👤 Agent: Aggregator                                                                                    │
│  Role: Result Aggregator                                                                                 │
│                                                                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/litellm/litellm_core_utils/str
eaming_handler.py:1545: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` 
instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at 
https://errors.pydantic.dev/2.10/migration/
  obj_dict = response.dict()
╭─────────────────────────────────────────── Generating... 0.3s ───────────────────────────────────────────╮
│ The article "How to Start Your Day Right" offers guidance on morning routines. In Kenya, a new tech hub  │
│ has been launched in Nairobi. Meanwhile, a recent tweet highlights that AI is transforming the world.    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.4s
╭────────────────────────────────────────────────── Task ──────────────────────────────────────────────────╮
│ You need to do the following task: Summarize the article, news, and Twitter feed results. Input data     │
│ from previous tasks:. Expected Output: A summary of all fetched information..                            │
│                                                                                                          │
│ Context:                                                                                                 │
│                                                                                                          │
│ Result of previous task fetch_article: Your favorite morning article: 'How to Start Your Day Right'      │
│                                                                                                          │
│ Result of previous task search_kenya_news: Kenya launches new tech hub in Nairobi                        │
│                                                                                                          │
│ Result of previous task fetch_twitter: Latest tweet: 'AI is transforming the world!' Please provide only │
│ the final result of your work. Do not add any conversation or extra explanation.                         │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────── Response ────────────────────────────────────────────────╮
│ The article "How to Start Your Day Right" offers guidance on morning routines. In Kenya, a new tech hub  │
│ has been launched in Nairobi. Meanwhile, a recent tweet highlights that AI is transforming the world.    │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
           INFO     [01:24:37] process.py:553 INFO Task aggregate_results has no next tasks,  process.py:553
                    ending workflow                                                                         

Parallel Processing Results:
Final result: The article "How to Start Your Day Right" offers guidance on morning routines. In Kenya, a new tech hub has been launched in Nairobi. Meanwhile, a recent tweet highlights that AI is transforming the world.



^CException ignored in: <function ClientSession.__del__ at 0x113f2d4e0>
Traceback (most recent call last):
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/aiohttp/client.py", line 459, in __del__
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/asyncio/base_events.py", line 1818, in call_exception_handler
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1518, in error
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1634, in _log
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1644, in handle
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1706, in callHandlers
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 978, in handle
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/rich/logging.py", line 144, in emit
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/rich/traceback.py", line 343, in from_exception
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/rich/traceback.py", line 404, in extract
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function BaseConnector.__del__ at 0x113bc3100>
Traceback (most recent call last):
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/aiohttp/connector.py", line 388, in __del__
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/asyncio/base_events.py", line 1818, in call_exception_handler
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1518, in error
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1634, in _log
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1644, in handle
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 1706, in callHandlers
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/logging/__init__.py", line 978, in handle
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/rich/logging.py", line 144, in emit
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/rich/traceback.py", line 343, in from_exception
  File "/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/rich/traceback.py", line 404, in extract
ImportError: sys.meta_path is None, Python is likely shutting down

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions