-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Bug]: llamaindex-cli unrecognized arguments: - files ./README.md #10315
Comments
🤖 Hey @fengyunzaidushi, good to see you here again! Hope your coding journey is going well. The error you're encountering is due to incorrect usage of the command. The command you're trying to run is The command-line argument for files is defined as parser.add_argument(
"-f",
"--files",
type=str,
help=(
"The name of the file or directory you want to ask a question about,"
'such as "file.pdf".'
),
) So, you should use the command The correct syntax for using the $ llamaindex-cli rag [-h] [-q QUESTION] [-f FILES] [-c] [-v] [--clear] Here are the options you can use:
For example, if you want to ask a question about a specific file, you can use the following command: $ llamaindex-cli rag --files "./README.md" And then ask a question like this: $ llamaindex-cli rag --question "What is LlamaIndex?" If you want to open a chat interface within your terminal, you can use the following command: $ llamaindex-cli rag --chat You can find more information about this in the docs/use_cases/q_and_a/rag_cli.md file. I hope this helps! If you have any other questions, feel free to ask. Best, SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
@fengyunzaidushi as the bot mentioned, please use |
thank you! |
Hmm, seems like a weird formatting error, I'll see if we can fix it |
Bug Description
`
(base) ubuntu@ubuntu:/mnt/sda/github/01yue/llama_index$ llamaindex-cli rag - files "./README.md"
usage: llamaindex-cli [-h] {rag,download-llamapack,download-llamadataset} ...
llamaindex-cli: error: unrecognized arguments: - files ./README.md
`
`
(base) ubuntu@ubuntu:/mnt/sda/github/01yue/llama_index$ llamaindex-cli -h
usage: llamaindex-cli [-h] {rag,download-llamapack,download-llamadataset} ...
LlamaIndex CLI tool.
options:
-h, --help show this help message and exit
commands:
{rag,download-llamapack,download-llamadataset}
rag Ask a question to a document / a directory of documents.
download-llamapack Download a llama-pack
download-llamadataset
Download a llama-dataset
`
Version
0.9.39
Steps to Reproduce
llamaindex-cli rag - files "./README.md"
Relevant Logs/Tracbacks
No response
The text was updated successfully, but these errors were encountered: