This module providers a way to interactive with llama_index directly in shell.
Because "experimental" is not included in the package yet (I think it's why it called "experimental"). For now, you need to git clone this repo and run these command in it.
Or you can set export PYTHONPATH=/path/to/your/llama_index before run following command.
For long term, when this part of code is stable enough, we can move to src. At that time user will be able to call it directly with something like python -m llama_index.cli init.
python -m experimental.cli init
this creates a config file "config.ini". If default config is not enough for you, you need to update it manually (for now).
python -m experimental.cli add ../data/
This use OpenAI/Azure OpenAI API to "analysis" files under "../data/" and store it in a file named "index.json" in current directory.
python -m experimental.cli query "Some question?"
This checks the local "index.json" and send some more query to OpenAI/Azure OpenAI for the answer to your question.
There're two files put in current directory.
- config.ini stores embedding/predicter model setup along with its parameters
- index.json the index file
Support following type of index:
[index]
type = vector[index]
type = keywordSupport following type of embedding:
[embed_model]
type = defaultSupport following type of LLM predictor:
[llm_predictor]
type = defaultIf you're using Azure OpenAI API, add engine:
[llm_predictor]
type = default
engine = text-davinci-003[llm_predictor]
type = structuredIt also supports Azure OpenAI API engine.
[store]
type = json
[index]
type = default
[embed_model]
type = default
[llm_predictor]
type = default[store]
type = json
[index]
type = keyword
[llm_predictor]
type = structured
engine = text-davinci-003