-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating google calender event with attendees error #1180
Comments
@Ashish240399 Can you share the code snippet? |
def create_event_google_calender_crew(query_string:str):
composio_toolset = ComposioToolSet(api_key="******",entity_id="****")
llm = ChatOpenAI(model="gpt-4o", api_key="##***$$$$")
composio_tools = composio_toolset.get_tools(apps=[App.GOOGLECALENDAR])
date = datetime.today().strftime("%Y-%m-%d")
timezone = datetime.now().astimezone().tzinfo
calendar_agent = Agent(
role="Google Calendar Agent",
goal="""You take action on Google Calendar using Google Calendar
APIs""",
backstory="""You are an AI agent responsible for taking actions on
Google Calendar on users' behalf.
You need to take action on Calendar using Google Calendar APIs. Use
correct tools to run APIs from the given tool-set.""",
verbose=True,
tools=composio_tools,
llm=llm,
)
task = Task(
description=f"Fill the following event details in the provided
'event_body' dictionary according to {query_string}. Today's date is {date}
(YYYY-MM-DD format) and timezone is {timezone}. Focus on populating fields
like 'summary', 'description', or adding attendees relevant to the query.",
agent=calendar_agent,
expected_output="",
)
crew = Crew(
agents=[calendar_agent],
tasks=[task],
verbose=True,
)
result = crew.kickoff()
return {"topic":query_string,"result":result}
query_string = "Create an event on 25th January 2025 for the attendees
***@***.*** and ***@***.*** with a meeting link to join, also
attendees should get updates about the meeting"
create_event_google_calender_crew(query_string)
This is working on Composio playground, It has created the event with
meeting link and attendees and then got the email as well, but when i use
it in code then only event is created, meeting and attendees is not added
as the llm is passing attendees as ["mailid"] rather than [{mail:""}], I
guess that might be the issue, Can you please help on this?
Thanks and regards
Ashish
…On Sun, Jan 12, 2025 at 11:13 PM Apoorv Taneja ***@***.***> wrote:
@Ashish240399 <https://github.com/Ashish240399> Can you share the code
snippet?
—
Reply to this email directly, view it on GitHub
<#1180 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXHQ5AN5PWXMKHOCW4S7Z2T2KKSURAVCNFSM6AAAAABVA36ZM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBVHA2DOMJXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While trying to same prompt which i have used in composio playground to create an event with attendees is not working. It is creating array or attendees with string of array. How can I fix this in crew ai
The text was updated successfully, but these errors were encountered: