How to Create APIs for AutoGen
23:37
Пікірлер
@nilamdhatrak6346
@nilamdhatrak6346 3 күн бұрын
Truly awesome! Many thanks!! Exactly what I was looking for!
@yeyulab
@yeyulab 3 күн бұрын
Glad you like it!
@user-wr4yl7tx3w
@user-wr4yl7tx3w 5 күн бұрын
how about using LangChain for RAG, can that work as well?
@yeyulab
@yeyulab 4 күн бұрын
It surely can. The easiest way is to create a create_retrieval_chain and register the invoke() as a function of the agent.
@GOGYPRO
@GOGYPRO 6 күн бұрын
Thank you for sharing this!
@yeyulab
@yeyulab 4 күн бұрын
Of course!
@mikew2883
@mikew2883 7 күн бұрын
Excellent! 👏
@yeyulab
@yeyulab 4 күн бұрын
Glad you like it!
@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 .
@yeyulab
@yeyulab 4 күн бұрын
Hey, the demo code was tested under the older version of these libraries: crewai==0.28.8 panel==1.4.0. CrewAI must have changed in some definitions but the basic idea of callback should be consistent. The original code: github.com/yeyu2/KZbin_demos/blob/10156ef4256aeb0e6ca88bf3191ebfe39f507956/crewai_panel.py
@ViktorIwan
@ViktorIwan 18 күн бұрын
Will it support PDF Upload / RAG ?
@yeyulab
@yeyulab 16 күн бұрын
The Swarm is a higher layer of agent orchestration framework. So the implementation of functions like RAG should be done by developers themselves. You can create a RAG agent with a “function” that processing user input and responding with doc retrieval.
@user-wr4yl7tx3w
@user-wr4yl7tx3w 20 күн бұрын
Better than Langgraph?
@yeyulab
@yeyulab 20 күн бұрын
I would say Swarm is just gathering multiple chatbots (very less system prompting techniques), it’s not for complex agents workflow like what Langgraph or AutoGen does.
@Idiot123009
@Idiot123009 22 күн бұрын
What about the query which doesn't need to call the function?
@yeyulab
@yeyulab 16 күн бұрын
The model will make a decision to possibly respond you with no calls
@zmjerry
@zmjerry 27 күн бұрын
What do you think about the OpenAI Swarm framework vs Agency Swarm? Is this still the more promising one?
@yeyulab
@yeyulab 26 күн бұрын
To me, I think Swarm frameworks are more focusing on complex and dynamic orchestration between agents, and the AgentKit is more like a quick improvement on models' reasoning process by adding sub-blocks and steps with external information supported. If you are building human interaction projects, you should choose Swarm so sure. For the comparison of OpenAI Swarm and Agency Swarm, the author of Agency Swarm has made a good video: kzbin.info/www/bejne/rF6ymIqdftKIpsU
@NavitaThakur-nd4il
@NavitaThakur-nd4il 28 күн бұрын
Thank for the code. I tried it but it does not return any response after putting the question
@yeyulab
@yeyulab 27 күн бұрын
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.
@blackswann9555
@blackswann9555 Ай бұрын
Awesome video!
@yeyulab
@yeyulab 27 күн бұрын
Glad you enjoyed it, thanks!
@jlcasesES
@jlcasesES Ай бұрын
🎯 Key points for quick navigation: 00:00 *📘 Introducción a Llama 3.2 y aplicaciones en dispositivos* - Presentación de los modelos ligeros Llama 3.2, especialmente los de 1B y 3B. - Comparación con los modelos medianos que destacan en comprensión visual compleja. - Capacidades multilingües y generación de texto de los modelos pequeños para aplicaciones en dispositivos. 02:31 *🔧 Función de llamada: Teoría y herramientas* - Explicación de la capacidad de llamada de funciones en modelos de lenguaje. - Introducción a la librería Instructor y Pydantic para definir y validar funciones. - Ventajas de implementar llamadas de funciones con modelos base no ajustados. 04:14 *💻 Ejemplo práctico: Función financiera con Llama 3.2* - Definición de la función dummy "get_revenue" utilizando modelos Pydantic. - Proceso de instalación de paquetes necesarios como "openai", "pydantic" e "instructor". - Configuración del API y preparación del entorno para ejecutar la función financiera. 06:16 *🛠️ Validación y ejecución de funciones generadas* - Ejecución del modelo Llama 3.2 1B para generar llamadas de funciones estructuradas. - Validación de la salida JSON que incluye el nombre de la función y sus argumentos. - Integración y ejecución de la función basada en los argumentos proporcionados por el modelo. 08:39 *🏠 Construcción de un sistema de hogar inteligente* - Definición de múltiples funciones como "set_temperature" y "toggle_lights" para controlar dispositivos. - Uso del modelo Llama 3.2 3B con Instructor para procesar comandos de usuario. - Demostración interactiva de comandos y respuestas del sistema en un entorno de hogar inteligente. 12:14 *✅ Conclusiones y beneficios de la automatización con Llama 3.2* - Importancia de conectar APIs reales y interfaces de hardware para automatizar acciones. - Ventajas económicas de utilizar modelos de código abierto como Llama 3.2. - Invitación a suscribirse al canal y próximos tutoriales para continuar innovando. Made with HARPA AI
@AsimovAcademy
@AsimovAcademy Ай бұрын
Thank you so much for this video! That's exactly what I was looking for :)
@yeyulab
@yeyulab Ай бұрын
Glad it was helpful! Thanks!
@ramannegi3729
@ramannegi3729 2 ай бұрын
I want to deploy to website I would can we do. .
@mahatmakawa8420
@mahatmakawa8420 2 ай бұрын
Hi can you try function call with the latest version of vllm and pyautogen? because the method you proposed is not working again. Thanks
@yeyulab
@yeyulab 2 ай бұрын
Ok, let me try it
@IdPreferNot1
@IdPreferNot1 2 ай бұрын
Excellent video covering what I imagine llama-index(smart-guys) have purporsefully developed as a more robust agent system that bets on the stronger performance of the next generation of foundation models.... exactly what Altman and other model builders suggest. Look forward to more on this framework in the future.
@gokusaiyan1128
@gokusaiyan1128 2 ай бұрын
love your series. Can you make a video on using autogen to generate a code and then later it compiles it too and we can a final executable from it. For e.g. I want it to write a function that takes web url and that web url requests example, later it analyzes the request to figure our the api routes and write a program in any compiled language that can make requests to that web url and execute it.
@successahead5598
@successahead5598 2 ай бұрын
can you help with crewai working with django
@raomotorsports
@raomotorsports 2 ай бұрын
THANK YOU 🙏🏻 Really appreciate the way you explain each step of the process! Made it super easy to understand how it works. You are the man!
@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?
@leane-q9y
@leane-q9y 2 ай бұрын
Great video! Does anyone know how to close the browser window that opens after the server is launched in the code? I am able to stop the server but not close the window with it...
@florentromanet5439
@florentromanet5439 2 ай бұрын
Thanks 🙏
@yeyulab
@yeyulab 2 ай бұрын
You’re welcome, hope it helps!
@jermesastudio
@jermesastudio 2 ай бұрын
Thank you for this tutorial. It was helpful for my work.
@yeyulab
@yeyulab 2 ай бұрын
Thanks, glad to see it helped
@mikew2883
@mikew2883 3 ай бұрын
Awesome tutorial! 👏
@yeyulab
@yeyulab 2 ай бұрын
Thanks
@NathanVirushabadoss
@NathanVirushabadoss 3 ай бұрын
can u please upload the video autogen with web sockets
@لغزالحياة-ظ5ك
@لغزالحياة-ظ5ك 3 ай бұрын
Thank you for the video 🎉🎉
@mikew2883
@mikew2883 3 ай бұрын
Good stuff! 👍
@gokusaiyan1128
@gokusaiyan1128 3 ай бұрын
can you do one video with autogen with UI, no I don't want autogen studio.
@MrMoonsilver
@MrMoonsilver 4 ай бұрын
Man!! Finally someone did it, thank you very much for sharing this with us!
@drlordbasil
@drlordbasil 4 ай бұрын
Thanks for this, I don't use autogen often, but I love the builds that are possible.
@AdibaHaque-f2j
@AdibaHaque-f2j 4 ай бұрын
Amazing video! Very to-the-point and helpful. I am encountering an issue and was hoping you could assist me. In your code, you reset input_future each time to receive new input from the user. However, when I attempt to implement this, I only receive responses from the agents the first time I provide input. After that, there is no further agent engagement or conversation, and the terminal indicates that no input is awaited. How can I maintain ongoing user engagement after each termination? For instance, if I have three agents engaging in the chat, I would like the flow to be: User input User proxy Agent 1 Agent 2 Then again User input User proxy Agent 1 Agent 2 And again And so on. Thank you!
@沃滋基
@沃滋基 4 ай бұрын
Thank you very much for sharing the code! It is very useful to me. Additionally, I would like to ask if it is possible to initiate a new round of conversation. Specifically, when one round of conversation has ended and I attempt to ask a second question, it enters the logic that prints 'There is currently no input being awaited.'"
@AnandKumar-fn4sd
@AnandKumar-fn4sd 5 ай бұрын
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 5 ай бұрын
My working version- Panel 1.4.0 CrewAI 0.28.8
@MrGaborKukucska
@MrGaborKukucska 5 ай бұрын
Thanks for your tutorials Yeyu 🙌
@MuhammadIkrma-sk7mh
@MuhammadIkrma-sk7mh 5 ай бұрын
user_proxy.initiate_chat( manager, message="""Generate a 120-word of blog post about traveling in Bohol Island. """ ) RuntimeError: Model client(s) ['CustomModelClient'] are not activated. Please register the custom model clients using `register_model_client` or filter them out form the config list.
@MuhammadIkrma-sk7mh
@MuhammadIkrma-sk7mh 5 ай бұрын
user_proxy.initiate_chat( manager, message="""Generate a 120-word of blog post about traveling in Bohol Island. """ ) RuntimeError: Model client(s) ['CustomModelClient'] are not activated. Please register the custom model clients using `register_model_client` or filter them out form the config list.
@jeremyrileysmith
@jeremyrileysmith 6 ай бұрын
The github doesn't have the texttospeech.py file. I am getting an error.
@archiee1337
@archiee1337 6 ай бұрын
great!
@anupamz23
@anupamz23 6 ай бұрын
thanks, but it seems del_name will not work with new version of autogen as code of CoversableAgent.py has been changed
@AbzDogg
@AbzDogg 6 ай бұрын
Hi, I tried running your code and ran into the following error Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x7f68b6a46f40>: cannot import name 'CrewAgentExecutor' from 'crewai.agents' (unknown location) File 'crewaipanel.py', line 12, in <module>: from crewai.agents import CrewAgentExecutor Traceback (most recent call last): File "/home/jarvis/projects/commonenv/lib/python3.8/site-packages/bokeh/application/handlers/code_runner.py", line 231, in run exec(self._code, module.__dict__) File "/home/jarvis/projects/crewaipanel/crewaipanel.py", line 12, in <module> from crewai.agents import CrewAgentExecutor ImportError: cannot import name 'CrewAgentExecutor' from 'crewai.agents' (unknown location) Tried various things to fix this but to no avail Can help? Thanks!
@sr.modanez
@sr.modanez 6 ай бұрын
perfeito, parabens
@KodandocomFaria
@KodandocomFaria 6 ай бұрын
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 ай бұрын
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
@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!
@williamwong8424
@williamwong8424 6 ай бұрын
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 ай бұрын
Good proposals! Stay tuned!
@bimbotsolutions6665
@bimbotsolutions6665 6 ай бұрын
Awesome...
@yeyulab
@yeyulab 6 ай бұрын
Thanks
@kreddy8621
@kreddy8621 6 ай бұрын
Nice, cheers for this
@yeyulab
@yeyulab 6 ай бұрын
Thanks!
@user-wr4yl7tx3w
@user-wr4yl7tx3w 6 ай бұрын
how about gradio? any thoughts about the pros and the cons between the two?
@zmjerry
@zmjerry 7 ай бұрын
Thanks for sharing! This is exactly what I'm looking for last week! Good job and keep on the good work!
@yeyulab
@yeyulab 6 ай бұрын
Thanks! I am glad that it is helpful for you!
@trafferz
@trafferz 7 ай бұрын
Very cool! Just started with CrewAi this week and had in mind trying another task today before seeing this video. Streamlit gui up and running. Looking forward to now playing more with the CrewAi internals to tweak output. Very useful. Thanks! Haven't looked yet, does Streamlit docs describe how we might put the Agent prompts to gui so they can be customized by a user from the interface as well?
@yeyulab
@yeyulab 6 ай бұрын
Do you mean you want to have more customized input from the UI for setup the CrewAI workflow?
@trafferz
@trafferz 6 ай бұрын
@@yeyulab missed this response. yeah, i've been messing around with streamlit to manage the task and agent attributes/prompts stored in a yaml file.
@mohamedkeddache4202
@mohamedkeddache4202 7 ай бұрын
I am struggling to find the syntax for my project, I got used to using ChatGPT to find the syntax, but now chatGPT don't know those recent information like Ollama, RAG, langchain, etc... (cause GPT have limited knowledge) -can you tell me where I can find the syntax?