Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
7.13k stars 935 forks source link

Several AI Agents in the same chat? (using CrewAI) #788

Closed sofiafernandescd closed 3 weeks ago

sofiafernandescd commented 8 months ago

Is there a way to have several AI Agents in the same chat?

I'm building a project that uses CrewAI, and built an UI using Chainlit. Right now all Agent responses appear under the name of the Chatbot, which I know that can be changed on config.toml file.

Is there a way to connect the answers from each Agent to the correpondant Agent's name?

Thanks in advance 🙏

pratyush581 commented 8 months ago

Yes you could use custom author names, and in your cl.message you could pass author=agent_name for respective outputs

ryann-sportsbet commented 7 months ago

@sofiafernandescd, how did you get response from CrewAI and output to Chainlit? I've tried with
result = crewai.kickoff()

and output with cl.Message(result).send() but when the CrewAI taking long time to finish, Chainlit seems to disconnected to the server, hence, when CrewAI finish, it does not output to Chainlit UI