Skip to content

Latest commit

 

History

History
 
 

google_calendar

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Google Calendar Loader

This loader reads your upcoming Google Calendar events and parses the relevant info into Documents.

As a prerequisite, you will need to register with Google and generate a credentials.json file in the directory where you run this loader. See here for instructions.

Usage

Here's an example usage of the GoogleCalendar. It will retrieve up to 100 future events, unless an optional number_of_results argument is passed. It will also retrieve only future events, unless an optional start_date argument is passed.

from llama_index import download_loader

GoogleCalendarReader = download_loader('GoogleCalendarReader')

loader = GoogleCalendarReader()
documents = loader.load_data()

Example

This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent.

LlamaIndex

from llama_index import GPTSimpleVectorIndex, download_loader

GoogleCalendarReader = download_loader('GoogleCalendarReader')

loader = GoogleCalendarReader()
documents = loader.load_data()
index = GPTSimpleVectorIndex(documents)
index.query('When am I meeting Gordon?')