@Tony, you save my day. I was looking to a example on how to have streamlit and crewAI interaction, not only at the end, but during the process. Very nice demo. I will use it as my default to my experiments. Thanks.
Awesome! I am glad to hear you find it useful! I saw a lot of questions around this and decided it was a good idea to work on it. Excited to see what end up building. Let me know if there's any other thing you'd like for me to cover.
Amazing. Would it make sense and be doable to display agents chat in the st.chat_messages component? So like even each agent would have individual icon and name?
Thank you! Yes, it is possible. I'll be working on another agent tutorial that will be more updated and use chat as well as a better parsed out agent process.
I used GPT-3.5 for this demo. Yes, it can be costly if the agents have long running processes. Another alternative is to use local models through Ollama or Groq while it's still free.
We're thinking the same. Adding human input to Streamlit is challenging due to the nature of the apps running from top to bottom each time there's an intereaction. So if we add human feedback and submit, it will rerun our code again from top to bottom instead of picking up from where we left of. I'm still trying to get it to work and will let you know if I get it working.
@@yazanrisheh5127 it would still not work since it will restart the process from the beginning regardless. It will not save the stage in session state and be able to start from there after human input. I'm still investigating a way to do this that is more cleaner.
🤔.... Say that I am a professional who is traveling. Is there any possibility to implement something like : OK I am occupied during this period of time in the day, what can I do before and afterward ?
Good question. Yes, you can add that to the box on the sidebar with any special things for context to the agent. Things like your hobbies or anything that you want the agent to be aware of when creating your itinerary.
Yes, you'll need OpenAI key for this but you can also use Ollama instead if you want to use a local model and reduce/cut out costs. GPT-4 has better results though. I'm actually experimenting with using Groq API to see if I can reduce the latency/wait times of the agents work. Would be much fun to have results much faster and not wait for too long.
hey can I pass extra parameters to the callback function lets say I want to save the output in a file, I want to give the filename how can we do it? agent = Agent( role=task_info.agent.role, goal=task_info.agent.goal, backstory=task_info.agent.backstory, verbose=False, llm=get_llm(), step_callback=write_callback_to_file(file_path="output.txt") ) def write_callback_to_file(step_output, file_path: str = "output.txt"): with open(file_path, 'a') as file: file.write("--- ") # some logic I want to do can we do something like this?
@@tonykipkemboi oh that's unfortunate, i tried looking at the documentation but didn't find any leads for the following, anything help would be greatly appreciated
I have been looking for something like this for a while. Thanks you so much for sharing.
Awesome! Glad you hear you find it useful. Thank you 🙏
this was what i been looking for , well description even for us non coders
Thank you for the feedback! Glad you find it useful.
This is exceptionally clear and easy to understand, Thank you!
@@Talking2Wall glad you enjoyed it.
Well Done Mister, been playing with the crewai Trip planner, Sreamlit is a great UI am going to it, Asante sana
Asante!
Stoked to see where you take this in the next iteration brother 🙌🏾
Maybe some interesting hierarchical systems
i will stay tuned, sur!!! thx for your work, i want to developp this for my university for research papers
Awesome! Thank you. That would be really cool.
This is really excellent video , I have been thinking about similar UI to adapt it to automate processes
Thank you. Let me know how that goes, good luck!
@Tony, you save my day. I was looking to a example on how to have streamlit and crewAI interaction, not only at the end, but during the process. Very nice demo. I will use it as my default to my experiments. Thanks.
Awesome! I am glad to hear you find it useful! I saw a lot of questions around this and decided it was a good idea to work on it. Excited to see what end up building. Let me know if there's any other thing you'd like for me to cover.
Fantastic tutorial!❤
Thank you 🙏
Amazing. Would it make sense and be doable to display agents chat in the st.chat_messages component? So like even each agent would have individual icon and name?
Thank you! Yes, it is possible. I'll be working on another agent tutorial that will be more updated and use chat as well as a better parsed out agent process.
nice work. you mentioned costs only for gpt (although 3.5 should be free), but what about scraper and BROWSERLESS, they do add costs to use cases?
looks like the step_callback is not working anymore. Is it a version issue? I'm on 0.76.9
Nice tutorial 👍
Thank you 🙏
Which LLM do you use for the agents? I am curious about the costs
I used GPT-3.5 for this demo. Yes, it can be costly if the agents have long running processes. Another alternative is to use local models through Ollama or Groq while it's still free.
Can you show how to integrate human input on streamlit
We're thinking the same. Adding human input to Streamlit is challenging due to the nature of the apps running from top to bottom each time there's an intereaction. So if we add human feedback and submit, it will rerun our code again from top to bottom instead of picking up from where we left of. I'm still trying to get it to work and will let you know if I get it working.
@@tonykipkemboi Wouldn't it work if you set it to a session state in this case?
@@yazanrisheh5127 it would still not work since it will restart the process from the beginning regardless. It will not save the stage in session state and be able to start from there after human input. I'm still investigating a way to do this that is more cleaner.
🤔.... Say that I am a professional who is traveling. Is there any possibility to implement something like : OK I am occupied during this period of time in the day, what can I do before and afterward ?
Good question. Yes, you can add that to the box on the sidebar with any special things for context to the agent. Things like your hobbies or anything that you want the agent to be aware of when creating your itinerary.
I have a question
Open ai api key is need
Yes, you'll need OpenAI key for this but you can also use Ollama instead if you want to use a local model and reduce/cut out costs. GPT-4 has better results though. I'm actually experimenting with using Groq API to see if I can reduce the latency/wait times of the agents work. Would be much fun to have results much faster and not wait for too long.
@@tonykipkemboi How about gpt3.5. ? Are there any cons in using it for testing/learning? I think it cost multiple times cheaper than version 4.
hey can I pass extra parameters to the callback function lets say I want to save the output in a file, I want to give the filename how can we do it?
agent = Agent(
role=task_info.agent.role,
goal=task_info.agent.goal,
backstory=task_info.agent.backstory,
verbose=False,
llm=get_llm(),
step_callback=write_callback_to_file(file_path="output.txt")
)
def write_callback_to_file(step_output, file_path: str = "output.txt"):
with open(file_path, 'a') as file:
file.write("---
")
# some logic I want to do
can we do something like this?
@@phani3519 so the CrewAI codebase has changed quite a lot that I might need to update this code.
@@tonykipkemboi oh that's unfortunate, i tried looking at the documentation but didn't find any leads for the following, anything help would be greatly appreciated
@@phani3519 no, I meant I will need to update the tutorial on my end.
@@tonykipkemboi it will be very helpful if you could do that! cheers, thanks for all your work
@@nandanayak-f2g coming soon