Back to Llama Index

Bored Llama: BoardDocs in LLaMA Index!

llama-index-integrations/readers/llama-index-readers-boarddocs/examples/BoardDocsReader.ipynb

0.14.21982 B
Original Source

Bored Llama: BoardDocs in LLaMA Index!

This is a fun experiment to see if we can crawl a BoardDocs site to index it for LangChain fun.

python
import sys
from llama_index import download_loader

# Use the temporary / staging location to exercise the loader before first checkin lands
BoardDocsReader = download_loader(
    "BoardDocsReader",
    loader_hub_url=(
        "https://raw.githubusercontent.com/dweekly/llama-hub/boarddocs/llama_hub"
    ),
    refresh_cache=True,
)
loader = BoardDocsReader(site="ca/redwood", committee_id="A4EP6J588C05")
python
# now the data is loaded, query it
from llama_index import GPTSimpleVectorIndex

# load all meetings from this committee.
documents = loader.load_data(meeting_ids=["CPSNV9612DF1"])

# build an index
index = GPTSimpleVectorIndex.from_documents(documents)
python
# Now we can start asking it questions!!
answer = index.query("When did Trustee Weekly start attending meetings?")
print(answer.response)