mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-12-03 10:33:17 +00:00
Merge branch 'main' into azure
This commit is contained in:
@@ -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/
|
||||
|
||||
|
||||
@@ -167,10 +167,9 @@ def complete_stream(question, docsearch, chat_history, api_key):
|
||||
messages_combine.append({"role": "user", "content": i["prompt"]})
|
||||
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
|
||||
)
|
||||
|
||||
completion = openai.ChatCompletion.create(model="gpt-3.5-turbo",
|
||||
messages=messages_combine, stream=True, max_tokens=500, temperature=0)
|
||||
|
||||
for line in completion:
|
||||
if "content" in line["choices"][0]["delta"]:
|
||||
# check if the delta contains content
|
||||
|
||||
Reference in New Issue
Block a user