From 899777632b821dd99b10f8b720b01fa728f44ae9 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 3 Jun 2023 16:09:10 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf5a9228..dc3c4c4d 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ You can find our [Roadmap](https://github.com/orgs/arc53/projects/2) here, pleas Note: Make sure you have docker installed 1. Open dowload this repository with `git clone https://github.com/arc53/DocsGPT.git` -2. Create .env file in your root directory and set your OPENAI_API_KEY with your openai api key +2. Create .env file in your root directory and set your OPENAI_API_KEY with your openai api key and VITE_API_STREAMING to true or false if you dont want streaming answers 3. Run `docker-compose build && docker-compose up` 4. Navigate to http://localhost:5173/ From 577d58c92bf28755d7724c395177521400612298 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 3 Jun 2023 16:31:10 +0100 Subject: [PATCH 2/2] less token less issues --- application/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/app.py b/application/app.py index baf62003..6e19f03b 100644 --- a/application/app.py +++ b/application/app.py @@ -170,7 +170,7 @@ def complete_stream(question, docsearch, chat_history, api_key): messages_combine.append({"role": "system", "content": i["response"]}) messages_combine.append({"role": "user", "content": question}) completion = openai.ChatCompletion.create(model="gpt-3.5-turbo", - messages=messages_combine, stream=True, max_tokens=1000, temperature=0) + messages=messages_combine, stream=True, max_tokens=500, temperature=0) for line in completion: if 'content' in line['choices'][0]['delta']: