Skip to content
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

Google Drive Access #1248

Open
bertytobing opened this issue Feb 5, 2025 · 0 comments
Open

Google Drive Access #1248

bertytobing opened this issue Feb 5, 2025 · 0 comments

Comments

@bertytobing
Copy link

bertytobing commented Feb 5, 2025

Currently I can't query my own Google Drive.

When I try to find folders containing a specific name, it returns zero folders even though I have many folders.

from composio_langchain import ComposioToolSet

composio_toolsets = ComposioToolSet(api_key=api_key, entity_id=entity_id)
tools = composio_toolsets.get_tools(actions=['GOOGLEDRIVE_CREATE_FOLDER', 'GOOGLEDRIVE_FIND_FILE', 'GOOGLEDRIVE_FIND_FOLDER', 'GOOGLEDRIVE_CREATE_FILE_FROM_TEXT', 'GOOGLEDRIVE_PARSE_FILE', 'GOOGLEDRIVE_EDIT_FILE', 'GOOGLEDRIVE_DELETE_FOLDER_OR_FILE'])

agent = create_openai_functions_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

task = "list all folder"
result = agent_executor.invoke({"input": task})
print(result)

Then I tried to create a folder using Composio action. After that, I tried the same query as before and it returned only 1 folder, which was the one I had created earlier.

from composio_langchain import ComposioToolSet

composio_toolsets = ComposioToolSet(api_key=api_key, entity_id=entity_id)
tools = composio_toolsets.get_tools(actions=['GOOGLEDRIVE_CREATE_FOLDER', 'GOOGLEDRIVE_FIND_FILE', 'GOOGLEDRIVE_FIND_FOLDER', 'GOOGLEDRIVE_CREATE_FILE_FROM_TEXT', 'GOOGLEDRIVE_PARSE_FILE', 'GOOGLEDRIVE_EDIT_FILE', 'GOOGLEDRIVE_DELETE_FOLDER_OR_FILE'])

agent = create_openai_functions_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)

task = "create a folder with name `testing composio`"
result = agent_executor.invoke({"input": task})
print(result)

Result when performing get list all folder:

{'input': 'list all folder', 'output': 'Here is the list of folders in your Google Drive:\n\n1. Folder Name: testing composio\n   Folder ID: 1_asdasd'}

Is this the expected behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant