How to Create an Interactive Web UI for CrewAI Applications By Panel

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 พ.ย. 2024

ความคิดเห็น • 22

  • @AsimovAcademy
    @AsimovAcademy หลายเดือนก่อน +1

    Thank you so much for this video! That's exactly what I was looking for :)

    • @yeyulab
      @yeyulab  29 วันที่ผ่านมา

      Glad it was helpful! Thanks!

  • @KodandocomFaria
    @KodandocomFaria 6 หลายเดือนก่อน +4

    A good one could be a video on how to expose it as an api, this way frontend developer can use creativite and create new interfaces for this agent.

    • @yeyulab
      @yeyulab  6 หลายเดือนก่อน +3

      Actually I am doing such projects, will share to you very soon. Thanks for the suggestion!

    • @dylanpoh7007
      @dylanpoh7007 5 หลายเดือนก่อน

      @@yeyulab Thanks for this great video! I am also looking forward to your next video on exposing API

  • @ronengit
    @ronengit 9 ชั่วโมงที่ผ่านมา

    hi Yeyu, this is what I was looking for !! - Thanks
    Unfortunately none of the Agents call backs are working for me .. I am using panel version 1.5.3 and crewai 0.70.1 .
    I Did add call back the tasks which provide some info through the chat but ..
    Help please .

  • @williamwong8424
    @williamwong8424 6 หลายเดือนก่อน +4

    hi Yeyu, this is great. I have subscribed. in the next video can i request a follow up on this -
    1. to have ability to search online be it tavily or serper or duckduckgo
    2. ability to infer from a knowledge base which we will feed it. example pdf, txt, docx etc
    this help the crew to be smarter in a way. please do ! thank u!

    • @yeyulab
      @yeyulab  6 หลายเดือนก่อน +3

      Good proposals! Stay tuned!

  • @bwilliams060
    @bwilliams060 2 หลายเดือนก่อน

    Hi Yeyu! I’m yet to see a video where chainlit has been paired up with crewai. Is there a reason for this? Is it more like streamlit or panel as far as long running multi agent frameworks?

  • @kreddy8621
    @kreddy8621 6 หลายเดือนก่อน +1

    Nice, cheers for this

    • @yeyulab
      @yeyulab  6 หลายเดือนก่อน

      Thanks!

  • @AnandKumar-fn4sd
    @AnandKumar-fn4sd 4 หลายเดือนก่อน

    Hello, which versions of python, panel, crewai are you using. I am consistently getting an error:
    AttributeError: module 'panel' has no attribute 'chat' for the basic chat. ( the first example)

    • @yeyulab
      @yeyulab  4 หลายเดือนก่อน

      My working version- Panel 1.4.0 CrewAI 0.28.8

  • @sr.modanez
    @sr.modanez 6 หลายเดือนก่อน +1

    perfeito, parabens

  • @NavitaThakur-nd4il
    @NavitaThakur-nd4il 19 วันที่ผ่านมา

    Thank for the code. I tried it but it does not return any response after putting the question

    • @yeyulab
      @yeyulab  18 วันที่ผ่านมา

      My bad, I forgot to attach the versions of these libraries as they probably have some conflicts if you install the latest ones. You'd better to install crewai==0.28.8 & panel==1.4.0 as when my code run successfully.

  • @xingwei3488
    @xingwei3488 6 หลายเดือนก่อน

    Very Good! You did a great job!
    I tried your github code (crewai_panel.py) and got this issue:
    Exception in thread Thread-3 (initiate_chat):
    Traceback (most recent call last):
    ...
    ...
    File "D:\Dev\crewai_test\main.py", line 22, in custom_ask_human_input
    chat_interface.send(prompt, user="assistant", respond=False)
    ^^^^^^^^^^^^^^
    NameError: name 'chat_interface' is not defined
    Could you help me ?

    • @yeyulab
      @yeyulab  6 หลายเดือนก่อน

      Have you copied the last three lines? chat_interface = pn.chat.ChatInterface(callback=callback)
      chat_interface.send("Send a message!", user="System", respond=False)
      chat_interface.servable()

    • @xingwei3488
      @xingwei3488 6 หลายเดือนก่อน

      ​@@yeyulab Yes. I have copied all the lines include the last three.
      Panel Application works fine until huan input.
      The issue throwed on my VSCode Terminal :
      ====
      (.venv) D:\Dev\crewai_panel>panel serve main.py
      2024-05-01 09:25:45,182 Starting Bokeh server version 3.4.1 (running on Tornado 6.4)
      2024-05-01 09:25:45,182 User authentication hooks NOT provided (default user enabled)
      2024-05-01 09:25:45,197 Bokeh app running at: localhost:5006/main
      2024-05-01 09:25:45,197 Starting Bokeh server with process id: 15076
      2024-05-01 09:25:55,994 WebSocket connection opened
      2024-05-01 09:25:55,994 ServerConnection created
      > Entering new CrewAgentExecutor chain...
      I need to delegate the task of writing the blog post of Trip to Shenzhen to the Blog Post Writer and ask them to include all the necessary details in the article.
      Action: Delegate work to co-worker
      Action Input: {
      "coworker": "Blog Post Writer",
      "task": "Write a blog post of Trip to Shenzhen",
      "context": "Please write a blog post about the recent trip to Shenzhen. Include details about the sights visited, the food tried, and the overall experience of the trip. The article should be under 100 words."
      }
      Title: Exploring the Vibrant City of Shenzhen
      Recently, I had the opportunity to visit the bustling city of Shenzhen, and it was truly a remarkable experience. From exploring the modern architecture of the Ping An Finance Centre to strolling through the vibrant streets of Huaqiangbei, every moment was filled with excitement. The local cuisine was a highlight of the trip, with delicious dishes such as dim sum and hot pot tantalizing my taste buds. Overall, my trip to Shenzhen was a perfect blend of culture, history, and gastronomy, leaving me with unforgettable memories to cherish. Can't wait to visit again!
      Final Answer:
      Title: Exploring the Vibrant City of Shenzhen
      Recently, I had the opportunity to visit the bustling city of Shenzhen, and it was truly a remarkable experience. From exploring the modern architecture of the Ping An Finance Centre to strolling through the vibrant streets of Huaqiangbei, every moment was filled with excitement. The local cuisine was a highlight of the trip, with delicious dishes such as dim sum and hot pot tantalizing my taste buds. Overall, my trip to Shenzhen was a perfect blend of culture, history, and gastronomy, leaving me with unforgettable memories to cherish. Can't wait to visit again!
      > Finished chain.
      > Entering new CrewAgentExecutor chain...
      I need to carefully review the blog post content and come up with specific comments for improvement to make it more viral on social media.
      Action: Delegate work to co-worker
      Action Input: {"coworker": "Blog Post Reviewer", "task": "Review blog post content for improvement suggestions", "context": "Title: Exploring the Vibrant City of Shenzhen - Recently, I had the opportunity to visit the bustling city of Shenzhen, and it was truly a remarkable experience. From exploring the modern architecture of the Ping An Finance Centre to strolling through the vibrant streets of Huaqiangbei, every moment was filled with excitement. The local cuisine was a highlight of the trip, with delicious dishes such as dim sum and hot pot tantalizing my taste buds. Overall, my trip to Shenzhen was a perfect blend of culture, history, and gastronomy, leaving me with unforgettable memories to cherish. Can't wait to visit again!"}
      Title: Exploring the Vibrant City of Shenzhen - Recently, I had the opportunity to visit the bustling city of Shenzhen, and it was truly a remarkable experience. From exploring the modern architecture of the Ping An Finance Centre to strolling through the vibrant streets of Huaqiangbei, every moment was filled with excitement. The local cuisine was a highlight of the trip, with delicious dishes such as dim sum and hot pot tantalizing my taste buds. Overall, my trip to Shenzhen was a perfect blend of culture, history, and gastronomy, leaving me with unforgettable memories to cherish. Can't wait to visit again!
      Review Comments:
      1. Consider adding more specific details about the modern architecture of the Ping An Finance Centre. What aspects of the architecture stood out to you the most?
      2. It would be helpful to include more information about the vibrant streets of Huaqiangbei. What unique shops or experiences did you encounter while strolling through the area?
      3. Provide more descriptions of the local cuisine in Shenzhen. What made the dim sum and hot pot dishes you tried stand out from other places you have visited?
      4. Expand on the cultural and historical aspects of your trip. Were there any particular landmarks or events that left a lasting impression on you?
      5. Consider incorporating personal anecdotes or stories to make the article more engaging for readers.
      6. End the article with a strong conclusion that summarizes your overall experience in Shenzhen and leaves readers with a lasting impression.
      Overall, the article has a good foundation but could benefit from more detailed descriptions and personal insights to enhance the reader's experience.
      Exception in thread Thread-3 (initiate_chat):
      Traceback (most recent call last):
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1008.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1073, in _bootstrap_inner
      self.run()
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1008.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1010, in run
      self._target(*self._args, **self._kwargs)
      File "D:\Dev\crewai_panel\main.py", line 43, in initiate_chat
      StartCrew(message)
      File "D:\Dev\crewai_panel\main.py", line 133, in StartCrew
      result = project_crew.kickoff()
      ^^^^^^^^^^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\crewai\crew.py", line 254, in kickoff
      result, manager_metrics = self._run_hierarchical_process()
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\crewai\crew.py", line 329, in _run_hierarchical_process
      task_output = task.execute(
      ^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\crewai\task.py", line 173, in execute
      result = self._execute(
      ^^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\crewai\task.py", line 182, in _execute
      result = agent.execute_task(
      ^^^^^^^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\crewai\agent.py", line 221, in execute_task
      result = self.agent_executor.invoke(
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\langchain\chains\base.py", line 163, in invoke
      raise e
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\langchain\chains\base.py", line 153, in invoke
      self._call(inputs, run_manager=run_manager)
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\crewai\agents\executor.py", line 124, in _call
      next_step_output = self._take_next_step(
      ^^^^^^^^^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\langchain\agents\agent.py", line 1138, in _take_next_step
      [
      File "D:\Dev\crewai_panel\.venv\Lib\site-packages\crewai\agents\executor.py", line 245, in _iter_next_step
      human_feedback = self._ask_human_input(output.return_values["output"])
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\Dev\crewai_panel\main.py", line 21, in custom_ask_human_input
      chat_interface.send(prompt, user="assistant", respond=False)
      ^^^^^^^^^^^^^^
      NameError: name 'chat_interface' is not defined
      ===
      What should I do now? Thanks a lot!

  • @bimbotsolutions6665
    @bimbotsolutions6665 6 หลายเดือนก่อน +1

    Awesome...

    • @yeyulab
      @yeyulab  6 หลายเดือนก่อน

      Thanks