From dd34db28e832fbf614cd11d2dd3700c665018a2c Mon Sep 17 00:00:00 2001 From: namuan <575441+namuan@users.noreply.github.com> Date: Sun, 29 Jan 2023 21:19:28 +0000 Subject: [PATCH] =?UTF-8?q?bump:=20version=201.4.1=20=E2=86=92=201.5.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ README.md | 14 ++++++++++++++ pyproject.toml | 4 ++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8245211..85ab19e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.5.0 (2023-01-29) + +### Feat + +- Allow user to specify a different LLM instead of OpenAI + ## 1.4.1 (2023-01-14) ### Fix diff --git a/README.md b/README.md index 8500717..91aef45 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,8 @@ Here I'm using a PDF file generated from this page [Parable of a Monetary Econom Before running this, you need to set up your OpenAI API key. You can get it from [OpenAI](https://beta.openai.com/account/api-keys). +> From version 1.5.0, you can skip OpenAI and use HuggingFace models to generate embeddings and answers. + ```shell export OPENAI_API_KEY= ``` @@ -51,6 +53,12 @@ The run the following command to start the training process: dr-doc-search --train -i ~/Downloads/parable-of-a-monetary-economy-heteconomist.pdf ``` +Use `huggingface` for generating embeddings: + +```shell +dr-doc-search --train -i ~/Downloads/parable-of-a-monetary-economy-heteconomist.pdf --embedding huggingface +``` + The training process generates some temporary files in the `OutputDir/dr-doc-search/` folder under your home directory. Here is what it looks like: @@ -89,6 +97,12 @@ Or You can open up a web interface (on port :5006) to ask questions: dr-doc-search --web-app -i ~/Downloads/parable-of-a-monetary-economy-heteconomist.pdf ``` +To use `huggingface` model, provide the `--llm` argument: + +```shell +dr-doc-search --web-app -i ~/Downloads/parable-of-a-monetary-economy-heteconomist.pdf --llm huggingface +``` + There are more options for choose the start and end pages for the PDF file. See the help for more details: diff --git a/pyproject.toml b/pyproject.toml index 022fc8f..32fa9db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dr-doc-search" -version = "1.4.1" +version = "1.5.0" description = "Search through a document using a chat interface" authors = [ "namuan ", @@ -71,7 +71,7 @@ mkdocstrings-python = "^0.8.3" [tool.commitizen] name = "cz_conventional_commits" -version = "1.4.1" +version = "1.5.0" tag_format = "$version" version_files = [ "pyproject.toml:version",