Skip to content

piroz/try-llama-index-spreadsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

try-llama-index-spreadsheet

data input from google spreadsheet to llama_index

You need to issue an OAuth client ID in your Google Cloud Platform project and save it in credential.json

You need OPENAI API KEY

example

This example creates index from Google Sheet and execute bot.

The spreadsheet_id in this sheet is the URL segment marked below.

ttps://docs.google.com/spreadsheets/d/1NM7l4LyisJQ4lx7kQZBqs9us4faDBeseSJDVKuzszlU/edit#gid=0

Specify the spreadsheet_id as the bot launch argument as shown below.

$ pipenv sync
$ env OPENAI_API_KEY=xxxxxx python bot.py 1NM7l4LyisJQ4lx7kQZBqs9us4faDBeseSJDVKuzszlU
INFO:googleapiclient.discovery_cache:file_cache is only supported with oauth2client<4.0.0
INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total LLM token usage: 0 tokens
INFO:llama_index.token_counter.token_counter:> [build_index_from_nodes] Total embedding token usage: 0 tokens
聞きたいことを教えてください。
>>>家はどこですか ?
INFO:llama_index.token_counter.token_counter:> [query] Total LLM token usage: 211 tokens
INFO:llama_index.token_counter.token_counter:> [query] Total embedding token usage: 0 tokens

家は海の中にあります。

聞きたいことを教えてください。
>>>昨年末はどうしていました?
INFO:llama_index.token_counter.token_counter:> [query] Total LLM token usage: 226 tokens
INFO:llama_index.token_counter.token_counter:> [query] Total embedding token usage: 0 tokens

昨年末は海外旅行をしました。

聞きたいことを教えてください。
>>>朝食はたべましたか?
INFO:llama_index.token_counter.token_counter:> [query] Total LLM token usage: 216 tokens
INFO:llama_index.token_counter.token_counter:> [query] Total embedding token usage: 0 tokens

はい、朝食をたべました。

聞きたいことを教えてください。
>>>何をたべました?
INFO:llama_index.token_counter.token_counter:> [query] Total LLM token usage: 210 tokens
INFO:llama_index.token_counter.token_counter:> [query] Total embedding token usage: 0 tokens

チキン南蛮でした。

聞きたいことを教えてください。

todo

  • Google SheetsReader improvements

About

data input from google spreadsheet to llama_index

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages