From 91fa932168f241a3e072251a84105483ff20e0bf Mon Sep 17 00:00:00 2001 From: Ankita Sikdar <115947852+AnkitaSikdar005@users.noreply.github.com> Date: Tue, 10 Oct 2023 02:06:52 +0530 Subject: [PATCH 01/35] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8be36122..d864e73f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,11 +17,11 @@ Thank you for choosing to contribute to DocsGPT! We are all very grateful! ## 🐞 Issues and Pull requests -We value contributions in the form of discussions or suggestions. We recommend taking a look at existing issues and our [roadmap](https://github.com/orgs/arc53/projects/2). +- We value contributions in the form of discussions or suggestions. We recommend taking a look at existing issues and our [roadmap](https://github.com/orgs/arc53/projects/2). -If you're interested in contributing code, here are some important things to know: +- If you're interested in contributing code, here are some important things to know: -We have a frontend built with React (Vite) and a backend in Python. +- We have a frontend built on React (Vite) and a backend in Python. ### If you are looking to contribute to frontend (⚛️React, Vite): From ddd938fd646242be3489dd866df56909a10b90a0 Mon Sep 17 00:00:00 2001 From: Exterminator11 Date: Wed, 11 Oct 2023 07:36:37 +0530 Subject: [PATCH 02/35] Parser for OpenAPI3(Swagger) --- scripts/parser/file/openapi3_parser.py | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 scripts/parser/file/openapi3_parser.py diff --git a/scripts/parser/file/openapi3_parser.py b/scripts/parser/file/openapi3_parser.py new file mode 100644 index 00000000..72feab71 --- /dev/null +++ b/scripts/parser/file/openapi3_parser.py @@ -0,0 +1,46 @@ +from urllib.parse import urlparse + +from openapi_parser import parse + +from base_parser import BaseParser + + +class OpenAPI3Parser(BaseParser): + def init_parser(self) -> None: + return super().init_parser() + + def get_base_urls(self, urls): + base_urls = [] + for i in urls: + parsed_url = urlparse(i) + base_url = parsed_url.scheme + "://" + parsed_url.netloc + if base_url not in base_urls: + base_urls.append(base_url) + return base_urls + + def get_info_from_paths(self, path): + info = "" + for operation in path.operations: + info += ( + f"\n{operation.method.value}=" + f"{operation.responses[0].description}" + ) + return info + + def parse_file(self, file_path): + data = parse(file_path) + results = "" + base_urls = self.get_base_urls(link.url for link in data.servers) + base_urls = ",".join([base_url for base_url in base_urls]) + results += f"Base URL:{base_urls}\n" + i = 1 + for path in data.paths: + info = self.get_info_from_paths(path) + results += ( + f"Path{i}: {path.url}\n" + f"description: {path.description}\n" + f"parameters: {path.parameters}\nmethods: {info}\n" + ) + i += 1 + with open("results.txt", "w") as f: + f.write(results) From bd70e00f084d12b539e25adcded4741d6408c702 Mon Sep 17 00:00:00 2001 From: Exterminator11 Date: Sun, 15 Oct 2023 17:00:54 +0530 Subject: [PATCH 03/35] Added tests and updated openapi3_parser.py --- scripts/parser/file/openapi3_parser.py | 20 +++-- tests/test_openapi3.yaml | 116 +++++++++++++++++++++++++ tests/test_openapi3parser.py | 29 +++++++ 3 files changed, 159 insertions(+), 6 deletions(-) create mode 100644 tests/test_openapi3.yaml create mode 100644 tests/test_openapi3parser.py diff --git a/scripts/parser/file/openapi3_parser.py b/scripts/parser/file/openapi3_parser.py index 72feab71..afea1e48 100644 --- a/scripts/parser/file/openapi3_parser.py +++ b/scripts/parser/file/openapi3_parser.py @@ -2,7 +2,10 @@ from urllib.parse import urlparse from openapi_parser import parse -from base_parser import BaseParser +try: + from scripts.parser.file.base_parser import BaseParser +except: + from base_parser import BaseParser class OpenAPI3Parser(BaseParser): @@ -20,11 +23,12 @@ class OpenAPI3Parser(BaseParser): def get_info_from_paths(self, path): info = "" - for operation in path.operations: - info += ( - f"\n{operation.method.value}=" - f"{operation.responses[0].description}" - ) + if(path.operations): + for operation in path.operations: + info += ( + f"\n{operation.method.value}=" + f"{operation.responses[0].description}" + ) return info def parse_file(self, file_path): @@ -42,5 +46,9 @@ class OpenAPI3Parser(BaseParser): f"parameters: {path.parameters}\nmethods: {info}\n" ) i += 1 + if(i==2): + with open("reff.txt", "w") as f: + f.write(str(path)) with open("results.txt", "w") as f: f.write(results) + return results \ No newline at end of file diff --git a/tests/test_openapi3.yaml b/tests/test_openapi3.yaml new file mode 100644 index 00000000..a015e14b --- /dev/null +++ b/tests/test_openapi3.yaml @@ -0,0 +1,116 @@ +openapi: "3.0.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +servers: + - url: http://petstore.swagger.io/v1 + - url: https://api.example.com/v1/resource + - url: https://api.example.com/v1/another/resource + - url: https://api.example.com/v1/some/endpoint +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + maximum: 100 + format: int32 + responses: + '200': + description: A paged array of pets + headers: + x-next: + description: A link to the next page of responses + schema: + type: string + content: + application/json: + schema: + $ref: "#/components/schemas/Pets" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + '201': + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + '200': + description: Expected response to a valid request + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + default: + description: unexpected error + content: + application/json: + schema: + $ref: "#/components/schemas/Error" +components: + schemas: + Pet: + type: object + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + maxItems: 100 + items: + $ref: "#/components/schemas/Pet" + Error: + type: object + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string \ No newline at end of file diff --git a/tests/test_openapi3parser.py b/tests/test_openapi3parser.py new file mode 100644 index 00000000..2374329d --- /dev/null +++ b/tests/test_openapi3parser.py @@ -0,0 +1,29 @@ +import pytest + +from scripts.parser.file.openapi3_parser import OpenAPI3Parser +from openapi_parser import parse + + +@pytest.mark.parametrize("urls, expected_base_urls", [ + (["http://petstore.swagger.io/v1", "https://api.example.com/v1/resource",'https://api.example.com/v1/another/resource','https://api.example.com/v1/some/endpoint'], ["http://petstore.swagger.io",'https://api.example.com']), +]) +def test_get_base_urls(urls, expected_base_urls): + assert OpenAPI3Parser().get_base_urls(urls) == expected_base_urls + +def test_get_info_from_paths(): + file_path = "tests/test_openapi3.yaml" + data = parse(file_path) + path=data.paths[1] + assert OpenAPI3Parser().get_info_from_paths(path)=="\nget=Expected response to a valid request" + + +def test_parse_file(): + file_path = "tests/test_openapi3.yaml" + results_real = "Base URL:http://petstore.swagger.io,https://api.example.com\nPath1: /pets\ndescription: None\nparameters: []\nmethods: \nget=A paged array of pets\npost=Null response\nPath2: /pets/{petId}\ndescription: None\nparameters: []\nmethods: \nget=Expected response to a valid request\n" + openapi_parser_test = OpenAPI3Parser() + results=openapi_parser_test.parse_file(file_path) + assert results == results_real + + +if __name__ == "__main__": + pytest.main() From 36b243e9d2a29d1d9438bd3b39285fadb50f16a8 Mon Sep 17 00:00:00 2001 From: Exterminator11 Date: Sun, 15 Oct 2023 17:16:12 +0530 Subject: [PATCH 04/35] Formatted all the changed files --- reff.txt | 1 + results.txt | 12 ++++++++ scripts/parser/file/openapi3_parser.py | 8 +++--- tests/test_openapi3parser.py | 39 ++++++++++++++++++++------ 4 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 reff.txt create mode 100644 results.txt diff --git a/reff.txt b/reff.txt new file mode 100644 index 00000000..c9e6362b --- /dev/null +++ b/reff.txt @@ -0,0 +1 @@ +Path(url='/pets', summary=None, description=None, operations=[Operation(method=, responses=[Response(is_default=False, description='A paged array of pets', code=200, content=[Content(type=, schema=Array(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_items=100, min_items=None, unique_items=None, items=Object(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_properties=None, min_properties=None, required=['id', 'name'], properties=[Property(name='id', schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=None, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=)), Property(name='name', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None)), Property(name='tag', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None))])))], headers=[Header(name='x-next', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None), description='A link to the next page of responses', required=False, deprecated=False)]), Response(is_default=True, description='unexpected error', code=None, content=[Content(type=, schema=Object(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_properties=None, min_properties=None, required=['code', 'message'], properties=[Property(name='code', schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=None, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=)), Property(name='message', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None))]))], headers=[])], summary='List all pets', description=None, operation_id='listPets', external_docs=None, request_body=None, deprecated=False, parameters=[Parameter(name='limit', location=, schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=100, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=), required=False, description='How many items to return at one time (max 100)', deprecated=False, style=, explode=True)], tags=['pets'], security=[]), Operation(method=, responses=[Response(is_default=False, description='Null response', code=201, content=None, headers=[]), Response(is_default=True, description='unexpected error', code=None, content=[Content(type=, schema=Object(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_properties=None, min_properties=None, required=['code', 'message'], properties=[Property(name='code', schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=None, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=)), Property(name='message', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None))]))], headers=[])], summary='Create a pet', description=None, operation_id='createPets', external_docs=None, request_body=None, deprecated=False, parameters=[], tags=['pets'], security=[])], parameters=[]) \ No newline at end of file diff --git a/results.txt b/results.txt new file mode 100644 index 00000000..beff8056 --- /dev/null +++ b/results.txt @@ -0,0 +1,12 @@ +Base URL:http://petstore.swagger.io,https://api.example.com +Path1: /pets +description: None +parameters: [] +methods: +get=A paged array of pets +post=Null response +Path2: /pets/{petId} +description: None +parameters: [] +methods: +get=Expected response to a valid request diff --git a/scripts/parser/file/openapi3_parser.py b/scripts/parser/file/openapi3_parser.py index afea1e48..9b3be5cd 100644 --- a/scripts/parser/file/openapi3_parser.py +++ b/scripts/parser/file/openapi3_parser.py @@ -4,7 +4,7 @@ from openapi_parser import parse try: from scripts.parser.file.base_parser import BaseParser -except: +except ModuleNotFoundError: from base_parser import BaseParser @@ -23,7 +23,7 @@ class OpenAPI3Parser(BaseParser): def get_info_from_paths(self, path): info = "" - if(path.operations): + if path.operations: for operation in path.operations: info += ( f"\n{operation.method.value}=" @@ -46,9 +46,9 @@ class OpenAPI3Parser(BaseParser): f"parameters: {path.parameters}\nmethods: {info}\n" ) i += 1 - if(i==2): + if i == 2: with open("reff.txt", "w") as f: f.write(str(path)) with open("results.txt", "w") as f: f.write(results) - return results \ No newline at end of file + return results diff --git a/tests/test_openapi3parser.py b/tests/test_openapi3parser.py index 2374329d..86517e64 100644 --- a/tests/test_openapi3parser.py +++ b/tests/test_openapi3parser.py @@ -1,27 +1,48 @@ import pytest - -from scripts.parser.file.openapi3_parser import OpenAPI3Parser from openapi_parser import parse +from scripts.parser.file.openapi3_parser import OpenAPI3Parser -@pytest.mark.parametrize("urls, expected_base_urls", [ - (["http://petstore.swagger.io/v1", "https://api.example.com/v1/resource",'https://api.example.com/v1/another/resource','https://api.example.com/v1/some/endpoint'], ["http://petstore.swagger.io",'https://api.example.com']), -]) +@pytest.mark.parametrize( + "urls, expected_base_urls", + [ + ( + [ + "http://petstore.swagger.io/v1", + "https://api.example.com/v1/resource", + "https://api.example.com/v1/another/resource", + "https://api.example.com/v1/some/endpoint", + ], + ["http://petstore.swagger.io", "https://api.example.com"], + ), + ], +) def test_get_base_urls(urls, expected_base_urls): assert OpenAPI3Parser().get_base_urls(urls) == expected_base_urls + def test_get_info_from_paths(): file_path = "tests/test_openapi3.yaml" data = parse(file_path) - path=data.paths[1] - assert OpenAPI3Parser().get_info_from_paths(path)=="\nget=Expected response to a valid request" + path = data.paths[1] + assert ( + OpenAPI3Parser().get_info_from_paths(path) + == "\nget=Expected response to a valid request" + ) def test_parse_file(): file_path = "tests/test_openapi3.yaml" - results_real = "Base URL:http://petstore.swagger.io,https://api.example.com\nPath1: /pets\ndescription: None\nparameters: []\nmethods: \nget=A paged array of pets\npost=Null response\nPath2: /pets/{petId}\ndescription: None\nparameters: []\nmethods: \nget=Expected response to a valid request\n" + results_real = ( + "Base URL:http://petstore.swagger.io,https://api.example.com\nPath1: " + + "/pets\ndescription: None\nparameters: []\nmethods: \n" + + "get=A paged array of pets\npost=Null " + + "response\nPath2: /pets/{petId}\ndescription: None\n" + + "parameters: []\nmethods: " + + "\nget=Expected response to a valid request\n" + ) openapi_parser_test = OpenAPI3Parser() - results=openapi_parser_test.parse_file(file_path) + results = openapi_parser_test.parse_file(file_path) assert results == results_real From 7159e4fbe29b67a55e62c9f2dec503b138a5e7a6 Mon Sep 17 00:00:00 2001 From: Exterminator11 Date: Sun, 15 Oct 2023 17:16:58 +0530 Subject: [PATCH 05/35] Formatted files --- reff.txt | 1 - results.txt | 12 ------------ 2 files changed, 13 deletions(-) delete mode 100644 reff.txt delete mode 100644 results.txt diff --git a/reff.txt b/reff.txt deleted file mode 100644 index c9e6362b..00000000 --- a/reff.txt +++ /dev/null @@ -1 +0,0 @@ -Path(url='/pets', summary=None, description=None, operations=[Operation(method=, responses=[Response(is_default=False, description='A paged array of pets', code=200, content=[Content(type=, schema=Array(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_items=100, min_items=None, unique_items=None, items=Object(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_properties=None, min_properties=None, required=['id', 'name'], properties=[Property(name='id', schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=None, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=)), Property(name='name', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None)), Property(name='tag', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None))])))], headers=[Header(name='x-next', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None), description='A link to the next page of responses', required=False, deprecated=False)]), Response(is_default=True, description='unexpected error', code=None, content=[Content(type=, schema=Object(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_properties=None, min_properties=None, required=['code', 'message'], properties=[Property(name='code', schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=None, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=)), Property(name='message', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None))]))], headers=[])], summary='List all pets', description=None, operation_id='listPets', external_docs=None, request_body=None, deprecated=False, parameters=[Parameter(name='limit', location=, schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=100, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=), required=False, description='How many items to return at one time (max 100)', deprecated=False, style=, explode=True)], tags=['pets'], security=[]), Operation(method=, responses=[Response(is_default=False, description='Null response', code=201, content=None, headers=[]), Response(is_default=True, description='unexpected error', code=None, content=[Content(type=, schema=Object(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_properties=None, min_properties=None, required=['code', 'message'], properties=[Property(name='code', schema=Integer(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, multiple_of=None, maximum=None, exclusive_maximum=None, minimum=None, exclusive_minimum=None, format=)), Property(name='message', schema=String(type=, title=None, enum=[], example=None, description=None, default=None, nullable=False, read_only=False, write_only=False, deprecated=False, extensions={}, max_length=None, min_length=None, pattern=None, format=None))]))], headers=[])], summary='Create a pet', description=None, operation_id='createPets', external_docs=None, request_body=None, deprecated=False, parameters=[], tags=['pets'], security=[])], parameters=[]) \ No newline at end of file diff --git a/results.txt b/results.txt deleted file mode 100644 index beff8056..00000000 --- a/results.txt +++ /dev/null @@ -1,12 +0,0 @@ -Base URL:http://petstore.swagger.io,https://api.example.com -Path1: /pets -description: None -parameters: [] -methods: -get=A paged array of pets -post=Null response -Path2: /pets/{petId} -description: None -parameters: [] -methods: -get=Expected response to a valid request From a7f5303eaf910e3b7375a4abfbe7a2fc2949fcf7 Mon Sep 17 00:00:00 2001 From: Exterminator11 Date: Sun, 15 Oct 2023 17:20:50 +0530 Subject: [PATCH 06/35] Cleaned up the code --- scripts/parser/file/openapi3_parser.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/parser/file/openapi3_parser.py b/scripts/parser/file/openapi3_parser.py index 9b3be5cd..4fd1ffaf 100644 --- a/scripts/parser/file/openapi3_parser.py +++ b/scripts/parser/file/openapi3_parser.py @@ -46,9 +46,6 @@ class OpenAPI3Parser(BaseParser): f"parameters: {path.parameters}\nmethods: {info}\n" ) i += 1 - if i == 2: - with open("reff.txt", "w") as f: - f.write(str(path)) with open("results.txt", "w") as f: f.write(results) return results From f328b39f57338def892b84ae0c9e27d87661aad8 Mon Sep 17 00:00:00 2001 From: Exterminator11 Date: Mon, 16 Oct 2023 21:05:47 +0530 Subject: [PATCH 07/35] Fixed import error --- scripts/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 7d48373f..badafff0 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -61,6 +61,7 @@ nltk==3.8.1 numcodecs==0.11.0 numpy==1.25.2 openai==0.27.8 +openapi3-parser==1.1.14 openpyxl==3.1.2 packaging==23.1 pandas==2.0.3 From ee6471351d4ee1ae8c651aece0aae94e7d32e35f Mon Sep 17 00:00:00 2001 From: Ankit Matth Date: Wed, 18 Oct 2023 18:41:03 +0530 Subject: [PATCH 08/35] Icon for Documentation changed --- frontend/src/Navigation.tsx | 4 ++-- frontend/src/assets/documentation.svg | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 frontend/src/assets/documentation.svg diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index be308eab..e85bbc57 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -7,7 +7,7 @@ import Message from './assets/message.svg'; import Hamburger from './assets/hamburger.svg'; import Key from './assets/key.svg'; import Info from './assets/info.svg'; -import Link from './assets/link.svg'; +import Documentation from './assets/documentation.svg'; import Discord from './assets/discord.svg'; import Github from './assets/github.svg'; import UploadIcon from './assets/upload.svg'; @@ -338,7 +338,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { rel="noreferrer" className="my-auto mx-4 flex h-9 cursor-pointer gap-4 rounded-3xl hover:bg-gray-100" > - link + documentation

Documentation

+ + \ No newline at end of file From 55921b262f1a41364d45f4eedf0c1f5503d1e2d4 Mon Sep 17 00:00:00 2001 From: KRISH SONI <67964054+krishvsoni@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:54:28 +0530 Subject: [PATCH 09/35] docker docs --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index edeb7b66..109728ed 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ If you don't have enough resources to run it, you can use bitsnbytes to quantize ## QuickStart -Note: Make sure you have Docker installed +Note: Make sure you have [Docker](https://www.docker.com/) installed On Mac OS or Linux, write: @@ -124,10 +124,19 @@ Make sure you have Python 3.10 or 3.11 installed. (check out [`application/core/settings.py`](application/core/settings.py) if you want to see more config options.) 2. (optional) Create a Python virtual environment: +You can follow the [Python official documentation](https://docs.python.org/3/tutorial/venv.html) for virtual environments . + +a) On Mac OS and Linux ```commandline python -m venv venv . venv/bin/activate ``` +b) On Windows +```commandline +python -m venv venv + venv/Scripts/activate +``` + 3. Change to the `application/` subdir and install dependencies for the backend: ```commandline pip install -r application/requirements.txt From e7bbc4ac0c72bb77c6b765be481ba1844d166d29 Mon Sep 17 00:00:00 2001 From: 0xrahul6 <113128186+0xrahul6@users.noreply.github.com> Date: Thu, 19 Oct 2023 17:13:30 +0000 Subject: [PATCH 10/35] Enhanced Chatwoot-Extension --- docs/pages/Extensions/Chatwoot-extension.md | 64 +++++++++++---------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/docs/pages/Extensions/Chatwoot-extension.md b/docs/pages/Extensions/Chatwoot-extension.md index f9db022b..d6494bbf 100644 --- a/docs/pages/Extensions/Chatwoot-extension.md +++ b/docs/pages/Extensions/Chatwoot-extension.md @@ -1,42 +1,44 @@ -### To Start Chatwoot Extension: +## Chatwoot Extension Setup Guide -1. **Prepare and Start DocsGPT:** - - Launch DocsGPT using the instructions in our [wiki](https://github.com/arc53/DocsGPT/wiki). - - Make sure to load your documentation. +### Step 1: Prepare and Start DocsGPT -2. **Get Access Token from Chatwoot:** - - Navigate to Chatwoot. - - Go to your profile (bottom left), click on profile settings. - - Scroll to the bottom and copy the **Access Token**. +- **Launch DocsGPT**: Follow the instructions in our [DocsGPT Wiki](https://github.com/arc53/DocsGPT/wiki) to start DocsGPT. Make sure to load your documentation. -3. **Set Up Chatwoot Extension:** - - Navigate to `/extensions/chatwoot`. - - Copy `.env_sample` and create a `.env` file. - - Fill in the values in the `.env` file: +### Step 2: Get Access Token from Chatwoot - ```env - docsgpt_url= - chatwoot_url= - docsgpt_key= - chatwoot_token= - ``` +- Go to Chatwoot. +- In your profile settings (located at the bottom left), scroll down and copy the **Access Token**. -4. **Start the Extension:** - - Use the command `flask run` to start the extension. +### Step 3: Set Up Chatwoot Extension -5. **Optional: Extra Validation** - - In `app.py`, uncomment lines 12-13 and 71-75. - - Add the following lines to your `.env` file: +- Navigate to `/extensions/chatwoot`. +- Copy the `.env_sample` file and create a new file named `.env`. +- Fill in the values in the `.env` file as follows: - ```env - account_id=(optional) 1 - assignee_id=(optional) 1 - ``` +```env +docsgpt_url= +chatwoot_url= +docsgpt_key= +chatwoot_token= +``` - These Chatwoot values help ensure you respond to the correct widget and handle questions assigned to a specific user. +### Step 4: Start the Extension + +- Use the command `flask run` to start the extension. + +### Step 5: Optional - Extra Validation + +- In app.py, uncomment lines 12-13 and 71-75. +- Add the following lines to your .env file: +```account_id=(optional) 1 +assignee_id=(optional) 1 +``` +These Chatwoot values help ensure you respond to the correct widget and handle questions assigned to a specific user. + +### Stopping Bot Responses for Specific User or Session -### Stopping Bot Responses for Specific User or Session: - If you want the bot to stop responding to questions for a specific user or session, add a label `human-requested` in your conversation. -### Additional Notes: -- For further details on training on other documentation, refer to our [wiki](https://github.com/arc53/DocsGPT/wiki/How-to-train-on-other-documentation). +### Additional Notes + +- For further details on training on other documentation, refer to our [wiki](https://github.com/arc53/DocsGPT/wiki/How-to-train-on-other-documentation). \ No newline at end of file From fe866b2d667ec7bc3dba5387b7a5f93a33227033 Mon Sep 17 00:00:00 2001 From: rasvanjaya21 Date: Fri, 20 Oct 2023 02:57:41 +0700 Subject: [PATCH 11/35] Enhance backdrop modal effect --- frontend/tailwind.config.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index b76b0222..69086069 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -12,7 +12,7 @@ module.exports = { 'eerie-black': '#212121', 'black-1000': '#343541', jet: '#343541', - 'gray-alpha': 'rgba(0,0,0, .1)', + 'gray-alpha': 'rgba(0,0,0, .64)', 'gray-1000': '#F6F6F6', 'gray-2000': 'rgba(0, 0, 0, 0.5)', 'gray-3000': 'rgba(243, 243, 243, 1)', From 78b8d3e41d06bfdb11801cafd3b2605363074fec Mon Sep 17 00:00:00 2001 From: Adarsh Jha <132337675+adarsh-jha-dev@users.noreply.github.com> Date: Fri, 20 Oct 2023 14:33:43 +0530 Subject: [PATCH 12/35] Update index.ts --- frontend/src/hooks/index.ts | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/frontend/src/hooks/index.ts b/frontend/src/hooks/index.ts index bcf3cee9..8d4e15eb 100644 --- a/frontend/src/hooks/index.ts +++ b/frontend/src/hooks/index.ts @@ -4,42 +4,63 @@ export function useOutsideAlerter( ref: RefObject, handler: () => void, additionalDeps: unknown[], + handleEscapeKey?: boolean, ) { useEffect(() => { - function handleClickOutside(this: Document, event: MouseEvent) { + function handleClickOutside(event: MouseEvent) { if (ref.current && !ref.current.contains(event.target as Node)) { handler(); } } + + function handleEscape(event: KeyboardEvent) { + if (event.key === 'Escape') { + handler(); + } + } + document.addEventListener('mousedown', handleClickOutside); + if (handleEscapeKey) { + document.addEventListener('keydown', handleEscape); + } + return () => { document.removeEventListener('mousedown', handleClickOutside); + if (handleEscapeKey) { + document.removeEventListener('keydown', handleEscape); + } }; }, [ref, ...additionalDeps]); } -// Use isMobile for checking if the width is in the expected mobile range (less than 768px) -// use IsDesktop for effects you explicitly only want when width is wider than 960px. export function useMediaQuery() { const mobileQuery = '(max-width: 768px)'; + const darkModeQuery = '(prefers-color-scheme: dark)'; // Detect dark mode const desktopQuery = '(min-width: 960px)'; const [isMobile, setIsMobile] = useState(false); const [isDesktop, setIsDesktop] = useState(false); + const [isDarkMode, setIsDarkMode] = useState(false); useEffect(() => { const mobileMedia = window.matchMedia(mobileQuery); const desktopMedia = window.matchMedia(desktopQuery); + const darkModeMedia = window.matchMedia(darkModeQuery); + const updateMediaQueries = () => { setIsMobile(mobileMedia.matches); setIsDesktop(desktopMedia.matches); + setIsDarkMode(darkModeMedia.matches); }; + updateMediaQueries(); + const listener = () => updateMediaQueries(); window.addEventListener('resize', listener); + return () => { window.removeEventListener('resize', listener); }; - }, [mobileQuery, desktopQuery]); + }, [mobileQuery, desktopQuery, darkModeQuery]); - return { isMobile, isDesktop }; + return { isMobile, isDesktop, isDarkMode }; } From a245383f8c8d89d2a170aef0ec76e7fd419b4fa5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Oct 2023 16:22:35 +0530 Subject: [PATCH 13/35] Added a custom 404 not found page --- frontend/src/App.tsx | 2 ++ frontend/src/PageNotFound.tsx | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 frontend/src/PageNotFound.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 44540943..878a98f9 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2,6 +2,7 @@ import { Routes, Route } from 'react-router-dom'; import Navigation from './Navigation'; import Conversation from './conversation/Conversation'; import About from './About'; +import PageNotFound from './PageNotFound'; import { inject } from '@vercel/analytics'; import { useMediaQuery } from './hooks'; import { useState } from 'react'; @@ -25,6 +26,7 @@ export default function App() { } /> } /> + } /> diff --git a/frontend/src/PageNotFound.tsx b/frontend/src/PageNotFound.tsx new file mode 100644 index 00000000..eaea5cc9 --- /dev/null +++ b/frontend/src/PageNotFound.tsx @@ -0,0 +1,15 @@ +import { Link } from 'react-router-dom'; + +export default function PageNotFound() { + return ( +
+

+

404

+

The page you are looking for does not exist.

+ +

+
+ ); +} From ae13e557a7d67b3e1a0d0ed344f9e6c3963747f3 Mon Sep 17 00:00:00 2001 From: Lokendra Kushwah <118094744+Lokendrakushwah12@users.noreply.github.com> Date: Fri, 20 Oct 2023 23:24:56 +0530 Subject: [PATCH 14/35] added the 3 cards in hero section with gradient border also its responsive --- frontend/package-lock.json | 210 +++++++++++++++++++------------------ frontend/package.json | 2 +- frontend/src/Hero.tsx | 14 +-- 3 files changed, 116 insertions(+), 110 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 5fed8451..4a67cc0c 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -43,7 +43,7 @@ "prettier-plugin-tailwindcss": "^0.2.2", "tailwindcss": "^3.2.4", "typescript": "^4.9.5", - "vite": "^4.1.5", + "vite": "^4.5.0", "vite-plugin-svgr": "^2.4.0" } }, @@ -416,9 +416,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", - "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", "cpu": [ "arm" ], @@ -432,9 +432,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", - "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", "cpu": [ "arm64" ], @@ -448,9 +448,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", - "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", "cpu": [ "x64" ], @@ -464,9 +464,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", - "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", "cpu": [ "arm64" ], @@ -480,9 +480,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", - "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", "cpu": [ "x64" ], @@ -496,9 +496,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", - "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", "cpu": [ "arm64" ], @@ -512,9 +512,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", - "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", "cpu": [ "x64" ], @@ -528,9 +528,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", - "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", "cpu": [ "arm" ], @@ -544,9 +544,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", - "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", "cpu": [ "arm64" ], @@ -560,9 +560,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", - "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", "cpu": [ "ia32" ], @@ -576,9 +576,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", - "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "cpu": [ "loong64" ], @@ -592,9 +592,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", - "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", "cpu": [ "mips64el" ], @@ -608,9 +608,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", - "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", "cpu": [ "ppc64" ], @@ -624,9 +624,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", - "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", "cpu": [ "riscv64" ], @@ -640,9 +640,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", - "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", "cpu": [ "s390x" ], @@ -656,9 +656,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", - "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", "cpu": [ "x64" ], @@ -672,9 +672,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", - "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", "cpu": [ "x64" ], @@ -688,9 +688,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", - "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", "cpu": [ "x64" ], @@ -704,9 +704,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", - "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", "cpu": [ "x64" ], @@ -720,9 +720,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", - "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", "cpu": [ "arm64" ], @@ -736,9 +736,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", - "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", "cpu": [ "ia32" ], @@ -752,9 +752,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", - "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", "cpu": [ "x64" ], @@ -2561,9 +2561,9 @@ } }, "node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "hasInstallScript": true, "bin": { @@ -2573,28 +2573,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" } }, "node_modules/escalade": { @@ -6482,9 +6482,9 @@ } }, "node_modules/rollup": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.14.0.tgz", - "integrity": "sha512-o23sdgCLcLSe3zIplT9nQ1+r97okuaiR+vmAPZPTDYB7/f3tgWIYNyiQveMsZwshBT0is4eGax/HH83Q7CG+/Q==", + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -7249,15 +7249,14 @@ } }, "node_modules/vite": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.1.5.tgz", - "integrity": "sha512-zJ0RiVkf61kpd7O+VtU6r766xgnTaIknP/lR6sJTZq3HtVJ3HGnTo5DaJhTUtYoTyS/CQwZ6yEVdc/lrmQT7dQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz", + "integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==", "dev": true, "dependencies": { - "esbuild": "^0.16.14", - "postcss": "^8.4.21", - "resolve": "^1.22.1", - "rollup": "^3.10.0" + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" @@ -7265,12 +7264,16 @@ "engines": { "node": "^14.18.0 || >=16.0.0" }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { "@types/node": ">= 14", "less": "*", + "lightningcss": "^1.21.0", "sass": "*", "stylus": "*", "sugarss": "*", @@ -7283,6 +7286,9 @@ "less": { "optional": true }, + "lightningcss": { + "optional": true + }, "sass": { "optional": true }, diff --git a/frontend/package.json b/frontend/package.json index 9dcbf4ae..0d9c3fd4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -54,7 +54,7 @@ "prettier-plugin-tailwindcss": "^0.2.2", "tailwindcss": "^3.2.4", "typescript": "^4.9.5", - "vite": "^4.1.5", + "vite": "^4.5.0", "vite-plugin-svgr": "^2.4.0" } } diff --git a/frontend/src/Hero.tsx b/frontend/src/Hero.tsx index 0644da67..34347c09 100644 --- a/frontend/src/Hero.tsx +++ b/frontend/src/Hero.tsx @@ -17,9 +17,9 @@ export default function Hero({ className = '' }: { className?: string }) { Start by entering your query in the input field below and we will do the rest!

-
-
-
+
+
+
lock
-
-
+
+
lock

Secure Data Storage

@@ -47,8 +47,8 @@ export default function Hero({ className = '' }: { className?: string }) {

-
-
+
+
lock Date: Sat, 21 Oct 2023 12:53:47 +0530 Subject: [PATCH 15/35] Update react-widget.md --- docs/pages/Extensions/react-widget.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/Extensions/react-widget.md b/docs/pages/Extensions/react-widget.md index 1cc11321..66001ba2 100644 --- a/docs/pages/Extensions/react-widget.md +++ b/docs/pages/Extensions/react-widget.md @@ -1,7 +1,7 @@ ### How to set up react docsGPT widget on your website: ### Installation -Got to your project and install a new dependency: `npm install docsgpt`. +Go to your project and install a new dependency: `npm install docsgpt`. ### Usage Go to your project and in the file where you want to use the widget, import it: From 960365a0633067af0c4daf0796fff56e6a735903 Mon Sep 17 00:00:00 2001 From: neha3423 Date: Sun, 22 Oct 2023 10:54:02 +0530 Subject: [PATCH 16/35] neha3423 --- CONTRIBUTING.md | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3407fdc9..a14e4bf7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,42 +57,55 @@ Here's a step-by-step guide on how to contribute to DocsGPT: 1. **Fork the Repository:** - Click the "Fork" button at the top-right of this repository to create your fork. -2. **Create and Switch to a New Branch:** +2. **Clone the Forked Repository:** + - Clone the repository using: + ''' shell + git clone https://github.com//DocsGPT.git + ''' + +3. **Keep your in Sync:** + - Before you make any changes, make sure that your fork is in sync to avoid merge conflicts. + '''shell + git remote add upstream https://github.com/arc53/DocsGPT.git + git pull upstream master + ''' + +4. **Create and Switch to a New Branch:** - Create a new branch for your contribution using: ```shell git checkout -b your-branch-name ``` -3. **Make Changes:** +5. **Make Changes:** - Make the required changes in your branch. -4. **Add Changes to the Staging Area:** +6. **Add Changes to the Staging Area:** - Add your changes to the staging area using: ```shell git add . ``` -5. **Commit Your Changes:** +7. **Commit Your Changes:** - Commit your changes with a descriptive commit message using: ```shell git commit -m "Your descriptive commit message" ``` -6. **Push Your Changes to the Remote Repository:** +8. **Push Your Changes to the Remote Repository:** - Push your branch with changes to your fork on GitHub using: ```shell git push origin your-branch-name ``` -7. **Submit a Pull Request (PR):** +9. **Submit a Pull Request (PR):** - Create a Pull Request from your branch to the main repository. Make sure to include a detailed description of your changes and reference any related issues. -8. **Collaborate:** +10. **Collaborate:** - Be responsive to comments and feedback on your PR. - Make necessary updates as suggested. - Once your PR is approved, it will be merged into the main repository. -9. **Testing:** +11. **Testing:** - Before submitting a Pull Request, ensure your code passes all unit tests. - To run unit tests from the root of the repository, execute: ```shell @@ -101,7 +114,7 @@ Here's a step-by-step guide on how to contribute to DocsGPT: *Note: You should run the unit test only after making the changes to the backend code.* -10. **Questions and Collaboration:** +12. **Questions and Collaboration:** - Feel free to join our Discord. We're very friendly and welcoming to new contributors, so don't hesitate to reach out. Thank you for considering contributing to DocsGPT! 🙏 From 6cbe4f2ea72fd1a10d2c0ee6ce4762d3acc3a016 Mon Sep 17 00:00:00 2001 From: neha3423 Date: Sun, 22 Oct 2023 11:38:23 +0530 Subject: [PATCH 17/35] neha3423 --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a14e4bf7..ff5aab35 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,13 +63,13 @@ Here's a step-by-step guide on how to contribute to DocsGPT: git clone https://github.com//DocsGPT.git ''' -3. **Keep your in Sync:** - - Before you make any changes, make sure that your fork is in sync to avoid merge conflicts. +3. **Keep your Fork in Sync:** + - Before you make any changes, make sure that your fork is in sync to avoid merge conflicts using: '''shell git remote add upstream https://github.com/arc53/DocsGPT.git git pull upstream master ''' - + 4. **Create and Switch to a New Branch:** - Create a new branch for your contribution using: ```shell From 5556be9cabc238dc542c922f5ecd36768c9730f9 Mon Sep 17 00:00:00 2001 From: Lakshmi Narayanan Date: Mon, 23 Oct 2023 00:32:57 +0400 Subject: [PATCH 18/35] Fix something went wrong message bubble --- frontend/src/conversation/ConversationBubble.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/conversation/ConversationBubble.tsx b/frontend/src/conversation/ConversationBubble.tsx index 37b93f2e..dbf00ad3 100644 --- a/frontend/src/conversation/ConversationBubble.tsx +++ b/frontend/src/conversation/ConversationBubble.tsx @@ -59,7 +59,7 @@ const ConversationBubble = forwardRef<
Date: Mon, 23 Oct 2023 14:44:37 +0530 Subject: [PATCH 19/35] Railway Deployment Guide Added --- docs/package-lock.json | 1 + docs/pages/Deploying/Railway-Deploying.md | 254 ++++++++++++++++++++++ docs/pages/Deploying/image.png | Bin 0 -> 11181 bytes 3 files changed, 255 insertions(+) create mode 100644 docs/pages/Deploying/Railway-Deploying.md create mode 100644 docs/pages/Deploying/image.png diff --git a/docs/package-lock.json b/docs/package-lock.json index b0255929..20f65d80 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -4,6 +4,7 @@ "requires": true, "packages": { "": { + "license": "MIT", "dependencies": { "@vercel/analytics": "^1.0.2", "docsgpt": "^0.2.4", diff --git a/docs/pages/Deploying/Railway-Deploying.md b/docs/pages/Deploying/Railway-Deploying.md new file mode 100644 index 00000000..15e2f60a --- /dev/null +++ b/docs/pages/Deploying/Railway-Deploying.md @@ -0,0 +1,254 @@ + +# Self-hosting DocsGPT on Railway + + + +Here's a step-by-step guide on how to host DocsGPT on Railway App. + + + +At first Clone and setup the project locally to run , test and Modify. + + + +### 1. Clone and GitHub SetUp + +a. Open Terminal (Windows Shell or Git bash(recommended)). + + + +b. Type `git clone https://github.com/arc53/DocsGPT.git` + + + +#### Download the package information + + + +Once it has finished cloning the repository, it is time to download the package information from all sources. To do so, simply enter the following command: + + + +`sudo apt update` + + + +#### Install Docker and Docker Compose + + + +DocsGPT backend and worker use Python, Frontend is written on React and the whole application is containerized using Docker. To install Docker and Docker Compose, enter the following commands: + + + +`sudo apt install docker.io` + + + +And now install docker-compose: + + + +`sudo apt install docker-compose` + + + +#### Access the DocsGPT Folder + + + +Enter the following command to access the folder in which the DocsGPT docker-compose file is present. + + + +`cd DocsGPT/` + + + +#### Prepare the Environment + + + +Inside the DocsGPT folder create a `.env` file and copy the contents of `.env_sample` into it. + + + +`nano .env` + + + +Make sure your `.env` file looks like this: + + + +``` + +OPENAI_API_KEY=(Your OpenAI API key) + +VITE_API_STREAMING=true + +SELF_HOSTED_MODEL=false + +``` + + + +To save the file, press CTRL+X, then Y, and then ENTER. + + + +Next, set the correct IP for the Backend by opening the docker-compose.yml file: + + + +`nano docker-compose.yml` + + + +And Change line 7 to: `VITE_API_HOST=http://localhost:7091` + +to this `VITE_API_HOST=http://:7091` + + + +This will allow the frontend to connect to the backend. + + + +#### Running the Application + + + +You're almost there! Now that all the necessary bits and pieces have been installed, it is time to run the application. To do so, use the following command: + + + +`sudo docker-compose up -d` + + + +Launching it for the first time will take a few minutes to download all the necessary dependencies and build. + + + +Once this is done you can go ahead and close the terminal window. + + + +### 2. Pushing it to your own Repository + + + +a. Create a Repository on your GitHub. + + + +b. Open Terminal in the same directory of the Cloned project. + + + +c. Type `git init` + + + +d. `git add .` + + + +e. `git commit -m "first-commit"` + + + +f. `git remote add origin ` + + + +g. `git push git push --set-upstream origin master` + +Your local files will now be pushed to your GitHub Account. :) + + +### 3. Create an Railway Account: + + + +If you haven't already, create or log in to your railway account do it by visiting [Railway](https://railway.app/) + + + +Signup via **GitHub** [Recommended]. + + + +### 4. Start New Project: + + + +a. Open Railway app and Click on "Start New Project." + + + +b. Choose any from the list of options available (Recommended "**Deploy from GitHub Repo**") + + + +c. Choose the required Repository from your Github. + + + +d. Configure and allow access to modify your GitHub content from the pop-up window. + + + +e. Agree to all the terms and conditions. + + + +PS: It may take a few minutes for the account setup to complete. + + + +#### You will get A free trail of $5 (use it for trail and then purchase if satisfied and needed) + + + +### 5. Connecting to Your newly Railway app with GitHub + + + +a. Choose DocsGPT repo from the list of your GitHub repository that you want to deploy now. + + + +b. Click on Deploy now . + + + +![Three Tabs will be there](image.png) + + + +c. Select Variables Tab. + + + +d. Upload the env file here that you used for local setup. + + + +e. Go to Settings Tab now. + + + +f. Go to "Networking" and click on Generate Domain Name, to get the URL of your hosted project. + + + +g. You can update the Root directory, build command, installation command as per need. + +*[However recommended not the disturb these options and leave them as default if not that needed.]* + + + + +Your own DocsGPT is now available at the Generated domain URl. :) \ No newline at end of file diff --git a/docs/pages/Deploying/image.png b/docs/pages/Deploying/image.png new file mode 100644 index 0000000000000000000000000000000000000000..2100e5b4d20e24108e52dff4de8e9c486ee4ff17 GIT binary patch literal 11181 zcmeHtcTiJX)UV|#D(zZOLCUp(G*Nm-RC@0anu4^1A|>=9B6y{W^gt-m6GG@E1W*v9 zg-{a-5JWm5L`nh#0x$Qw-<$87dH=ncH}huR+cW2!wdU-7&e^}c_Bwm*_4{CKsKtJX z=hCTDr`UD0pPQaK^#`3PCtNtsJn!r6O*1d2{Y|x=o~j<^U1KVLxTzbcpE^~W!g}=b z98XhhHo#*Q2!4Blvh=6O)`Yb)MC0r>9R;EjwJla)dGKbFII1=3ZtZ1+U;QnKL^Dg;It*m(wWS_jRo7 z4!{7q1%0>g@@eKrGRrE&$*+1C?E0T-fW>2>7mC;SSAA10A{hMZ zofPZ8Y9Tz{H}cHC@@m(GfAIOI-1uwt?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`Rljm&P{h1*XRFO zPK1FnBhd6E8JS6$0WggL=xEba51Eh}pDHjs_+vnJZA-_S<3L}Xd{VKt54T!-KN{Ac zb}&k!FW_|BEOqNBLls%fFu8IUp|Do0`W{WErb!wKo0-S=Tfv52s`^B;mzdWsi78D{9{ZUs>24E+P?BWqy z7G!Cb7YC9RX+m#dj4Jam*_#EvZVjP%G~cGmlHP1kM`q69U&o)$pMwR$`hEnx3;!nu zx*Ck*MBH%3|jlVMc48fA79S- zUcpU=5cc>n-%BR;J8vAkxWd;ZC;tS1JQG>R*JhtoRO;)vD58h(G2J z!5FGfGa%5f#YeWww)PL6BVQ7><&{R)@D5Cj!mnPSqY^Ku&uJ9?ZuJ5<)3mJWo_6;t z&s2V8Zu8aj>|s7O*V#>`cC}`U%}P@=sqGC2Zw_X|pPJIMJ*|3sHZcKoZiq*M)s(fj_B*T1hLb>J~ z`ZMP++s~JmGOKY_sjQ9N2Yjba1>EsT7R2(DOV?A9$Jt?O4qlvMem3ZEm9(m_wx8L> z{^4Z>6>AC%kN)K%7;>$OQ^eY;_>&ALN$@F?0@tBHy$@*iENzN#;(%SoE7xdK?)5+z ziu~fEWe?6KFx!5atr%rtvc6)cV!Cfiu?;gl&ToWP60_}_hgG#5hS6^xU*2Z2^}L_wdg&e{l7GBZw(*m*g;?@lP3<{6EPa`#;I$Yq_@;FWPCS*Ew*&^>1IESOo~K z9x}O$ZkO*=9;3T*&MIo^B0Gk8|Ks+T*t`ElJXHO^i;eh~;L5t)e`8hpOWq9lZ^?zIgjT E0GIWpBLDyZ literal 0 HcmV?d00001 From 9b044815de92951f9c80844b1b27c8e578d2ecc8 Mon Sep 17 00:00:00 2001 From: Ankita Sikdar <115947852+AnkitaSikdar005@users.noreply.github.com> Date: Mon, 23 Oct 2023 17:07:25 +0530 Subject: [PATCH 20/35] Update CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 512b6c23..3daec1f5 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,8 +2,8 @@ ## Our Pledge -We as members, contributors, and leaders, pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body +We as members, contributors and leaders pledge to make participation in our +community, a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity @@ -72,20 +72,18 @@ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed +- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community space. -**Consequence**: A private, written warning from community leaders, providing +- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning - -**Community Impact**: A violation through a single incident or series +- **Community Impact**: A violation through a single incident or series of actions. -**Consequence**: A warning with consequences for continued behavior. No +- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels @@ -93,23 +91,21 @@ like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including +- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. -**Consequence**: A temporary ban from any sort of interaction or public +- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community +- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression towards or disparagement of classes of individuals. -**Consequence**: A permanent ban from any sort of public interaction within +- **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution From 9e632aa0bdfbf80d78b03c4fe9f12a3add28e9ee Mon Sep 17 00:00:00 2001 From: KRISH SONI <67964054+krishvsoni@users.noreply.github.com> Date: Mon, 23 Oct 2023 22:01:07 +0530 Subject: [PATCH 21/35] Update README.md --- README.md | 110 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index b570dfc7..3a6448dd 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@

- DocsGPT is a cutting-edge open-source solution that streamlines the process of finding information in project documentation. With its integration of the powerful GPT models, developers can easily ask questions about a project and receive accurate answers. + DocsGPT is a cutting-edge open-source solution that streamlines the process of finding information in the project documentation. With its integration of the powerful GPT models, developers can easily ask questions about a project and receive accurate answers. -Say goodbye to time-consuming manual searches, and let DocsGPT help you quickly find the information you need. Try it out and see how it revolutionizes your project documentation experience. Contribute to its development and be a part of the future of AI-powered assistance. +Say goodbye to time-consuming manual searches, and let DocsGPT help you quickly find the information you need. Try it out and see how it revolutionizes your project documentation experience. Contribute to its development and be a part of the future of AI-powered assistance.

@@ -21,64 +21,62 @@ Say goodbye to time-consuming manual searches, and let DocsGPT
-### Production Support / Help for companies: +### Production Support / Help for companies: We're eager to provide personalized assistance when deploying your DocsGPT to a live environment. -- [Schedule Demo 👋](https://cal.com/arc53/docsgpt-demo-b2b?date=2023-10-04&month=2023-10) + +- [Book Demo 👋](https://airtable.com/appdeaL0F1qV8Bl2C/shrrJF1Ll7btCJRbP) - [Send Email ✉️](mailto:contact@arc53.com?subject=DocsGPT%20support%2Fsolutions) - + ### [🎉 Join the Hacktoberfest with DocsGPT and Earn a Free T-shirt! 🎉](https://github.com/arc53/DocsGPT/blob/main/HACKTOBERFEST.md) ![video-example-of-docs-gpt](https://d3dg1063dc54p9.cloudfront.net/videos/demov3.gif) - ## Roadmap You can find our roadmap [here](https://github.com/orgs/arc53/projects/2). Please don't hesitate to contribute or create issues, it helps us improve DocsGPT! ## Our Open-Source models optimized for DocsGPT: -| Name | Base Model | Requirements (or similar) | -|-------------------|------------|----------------------------------------------------------| -| [Docsgpt-7b-falcon](https://huggingface.co/Arc53/docsgpt-7b-falcon) | Falcon-7b | 1xA10G gpu | -| [Docsgpt-14b](https://huggingface.co/Arc53/docsgpt-14b) | llama-2-14b | 2xA10 gpu's | -| [Docsgpt-40b-falcon](https://huggingface.co/Arc53/docsgpt-40b-falcon) | falcon-40b | 8xA10G gpu's | - +| Name | Base Model | Requirements (or similar) | +| --------------------------------------------------------------------- | ----------- | ------------------------- | +| [Docsgpt-7b-falcon](https://huggingface.co/Arc53/docsgpt-7b-falcon) | Falcon-7b | 1xA10G gpu | +| [Docsgpt-14b](https://huggingface.co/Arc53/docsgpt-14b) | llama-2-14b | 2xA10 gpu's | +| [Docsgpt-40b-falcon](https://huggingface.co/Arc53/docsgpt-40b-falcon) | falcon-40b | 8xA10G gpu's | If you don't have enough resources to run it, you can use bitsnbytes to quantize. - ## Features ![Group 9](https://user-images.githubusercontent.com/17906039/220427472-2644cff4-7666-46a5-819f-fc4a521f63c7.png) - ## Useful links - [Live preview](https://docsgpt.arc53.com/) - - [Join our Discord](https://discord.gg/n5BX8dh8rU) - - [Guides](https://docs.docsgpt.co.uk/) - [Interested in contributing?](https://github.com/arc53/DocsGPT/blob/main/CONTRIBUTING.md) +- 🔍🔥 [Live preview](https://docsgpt.arc53.com/) - [How to use any other documentation](https://docs.docsgpt.co.uk/Guides/How-to-train-on-other-documentation) +- 💬🎉[Join our Discord](https://discord.gg/n5BX8dh8rU) - [How to host it locally (so all data will stay on-premises)](https://docs.docsgpt.co.uk/Guides/How-to-use-different-LLM) +- 📚😎 [Guides](https://docs.docsgpt.co.uk/) +- 👩‍💻👨‍💻 [Interested in contributing?](https://github.com/arc53/DocsGPT/blob/main/CONTRIBUTING.md) + +- 🗂️🚀 [How to use any other documentation](https://docs.docsgpt.co.uk/Guides/How-to-train-on-other-documentation) + +- 🏠🔐 [How to host it locally (so all data will stay on-premises)](https://docs.docsgpt.co.uk/Guides/How-to-use-different-LLM) ## Project structure + - Application - Flask app (main application). - Extensions - Chrome extension. -- Scripts - Script that creates similarity search index and stores for other libraries. +- Scripts - Script that creates similarity search index for other libraries. - Frontend - Frontend uses Vite and React. ## QuickStart -Note: Make sure you have [Docker](https://www.docker.com/) installed +Note: Make sure you have [Docker](https://docs.docker.com/) installed On Mac OS or Linux, write: @@ -89,15 +87,17 @@ It will install all the dependencies and allow you to download the local model o Otherwise, refer to this Guide: 1. Download and open this repository with `git clone https://github.com/arc53/DocsGPT.git` -2. Create a `.env` file in your root directory and set the env variable `OPENAI_API_KEY` with your OpenAI API key and `VITE_API_STREAMING` to true or false, depending on if you want streaming answers or not. +2. Create a `.env` file in your root directory and set the env variable `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/account/api-keys) and `VITE_API_STREAMING` to true or false, depending on whether you want streaming answers or not. It should look like this inside: - + ``` API_KEY=Yourkey VITE_API_STREAMING=true ``` - See optional environment variables in the `/.env-template` and `/application/.env_sample` files. -3. Run `./run-with-docker-compose.sh`. + + See optional environment variables in the [/.env-template](https://github.com/arc53/DocsGPT/blob/main/.env-template) and [/application/.env_sample](https://github.com/arc53/DocsGPT/blob/main/application/.env_sample) files. + +3. Run [./run-with-docker-compose.sh](https://github.com/arc53/DocsGPT/blob/main/run-with-docker-compose.sh). 4. Navigate to http://localhost:5173/. To stop, just run `Ctrl + C`. @@ -105,10 +105,12 @@ To stop, just run `Ctrl + C`. ## Development environments ### Spin up mongo and redis -For development, only two containers are used from `docker-compose.yaml` (by deleting all services except for Redis and Mongo). + +For development, only two containers are used from [docker-compose.yaml](https://github.com/arc53/DocsGPT/blob/main/docker-compose.yaml) (by deleting all services except for Redis and Mongo). See file [docker-compose-dev.yaml](./docker-compose-dev.yaml). Run + ``` docker compose -f docker-compose-dev.yaml build docker compose -f docker-compose-dev.yaml up -d @@ -119,35 +121,67 @@ docker compose -f docker-compose-dev.yaml up -d Make sure you have Python 3.10 or 3.11 installed. 1. Export required environment variables or prepare a `.env` file in the `/application` folder: - - Copy `.env_sample` and create `.env` with your OpenAI API token for the `API_KEY` and `EMBEDDINGS_KEY` fields. + - Copy [.env_sample](https://github.com/arc53/DocsGPT/blob/main/application/.env_sample) and create `.env` with your OpenAI API token for the `API_KEY` and `EMBEDDINGS_KEY` fields. (check out [`application/core/settings.py`](application/core/settings.py) if you want to see more config options.) 2. (optional) Create a Python virtual environment: + You can follow the [Python official documentation](https://docs.python.org/3/tutorial/venv.html) for virtual environments. + +a) On Mac OS and Linux + ```commandline python -m venv venv . venv/bin/activate ``` -3. Change to the `application/` subdir and install dependencies for the backend: + +b) On Windows + ```commandline -pip install -r application/requirements.txt +python -m venv venv + venv/Scripts/activate ``` + +3. Change to the `application/` subdir by the command `cd application/` and install dependencies for the backend: + +```commandline +pip install -r requirements.txt +``` + 4. Run the app using `flask run --host=0.0.0.0 --port=7091`. 5. Start worker with `celery -A application.app.celery worker -l INFO`. -### Start frontend +### Start frontend Make sure you have Node version 16 or higher. -1. Navigate to the `/frontend` folder. -2. Install dependencies by running `npm install`. -3. Run the app using `npm run dev`. +1. Navigate to the [/frontend](https://github.com/arc53/DocsGPT/tree/main/frontend) folder. +2. Install the required packages `husky` and `vite` (ignore if already installed). + +```commandline +npm install husky -g +npm install vite -g +``` + +3. Install dependencies by running `npm install --include=dev`. +4. Run the app using `npm run dev`. + +## Contributing + +Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file for information about how to get involved. We welcome issues, questions, and pull requests. + +## Code Of Conduct + +We as members, contributors, and leaders, pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. Please refer to the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) file for more information about contributing. ## Many Thanks To Our Contributors - - + + Contributors +## License + +The source code license is [MIT](https://opensource.org/license/mit/), as described in the [LICENSE](LICENSE) file. Built with [🦜️🔗 LangChain](https://github.com/hwchase17/langchain) From 130a6b67bd6113513c964437de841f33037db14d Mon Sep 17 00:00:00 2001 From: KRISH SONI <67964054+krishvsoni@users.noreply.github.com> Date: Mon, 23 Oct 2023 22:16:19 +0530 Subject: [PATCH 22/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a6448dd..9aaad49a 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ If you don't have enough resources to run it, you can use bitsnbytes to quantize ## QuickStart -Note: Make sure you have [Docker](https://docs.docker.com/) installed +Note: Make sure you have [Docker](https://docs.docker.com/engine/install/) installed On Mac OS or Linux, write: From 8934b9ab5c26a5e51c51cfd94925fbac41171942 Mon Sep 17 00:00:00 2001 From: Gourav2609 Date: Mon, 23 Oct 2023 23:15:07 +0530 Subject: [PATCH 23/35] Fixed overflow --- frontend/src/Navigation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index c6c35af8..aed0965e 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -172,7 +172,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { <> {!navOpen && (