Retrieval-Augmented Generation for GPTScript. Leveraging an embedding model and a generation model behind OpenAI API, the RAG tool can answer prompts based on provided documents. There is an adhoc mode where nothing is persisted and we're using an in-memory vector database, so the embeddings don't persist between runs.
- Python 3.10+
- OpenAI API Key - exported as
OPENAI_API_KEY
environment variable
gptscript tool.gpt --prompt "<your question>" --inputs "<your documents>"`
--prompt
- The prompt to ask the model--inputs
- The documents to use for retrieval: comma-separated list of files or directories
gptscript tool.gpt --prompt "What are the CLI options for the RAG tool?" --inputs "README.md"
is the same as
gptscript examples/readme.gpt