Skip to content

Commit e3fbd2a

Browse files
authored
Merge pull request #1 from DPende/refactoring_project
Refactoring of the project
2 parents 79ca65b + 0adf871 commit e3fbd2a

File tree

11 files changed

+10
-11
lines changed

11 files changed

+10
-11
lines changed

.DS_Store

-6 KB
Binary file not shown.

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
API_KEY="your openai.com api key"

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
.DS_Store?
3+
._*
4+
__pycache__/

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Follow the following steps:
2222
3. Go to [https://openai.com](https://openai.com/) and login
2323
4. Now you can access to [https://platform.openai.com/docs/overview](https://platform.openai.com/docs/overview)
2424
5. Create a new API key and copy it
25-
![Screenshot 2024-01-26 alle 17.10.10.png](doc/Screenshot_2024-01-26_alle_17.10.10.png)
25+
![Screenshot 2024-01-26 alle 17.10.10.png](docs/generate_api_key/step_1.png)
2626

27-
![Screenshot 2024-01-26 alle 17.10.31.png](doc/Screenshot_2024-01-26_alle_17.10.31.png)
27+
![Screenshot 2024-01-26 alle 17.10.31.png](docs/generate_api_key/step_2.png)
2828

29-
![Screenshot 2024-01-26 alle 17.10.52.png](doc/Screenshot_2024-01-26_alle_17.10.52.png)
29+
![Screenshot 2024-01-26 alle 17.10.52.png](docs/generate_api_key/step_3.png)
3030

31-
![Screenshot 2024-01-26 alle 17.11.10.png](doc/Screenshot_2024-01-26_alle_17.11.10.png)
31+
![Screenshot 2024-01-26 alle 17.11.10.png](docs/generate_api_key/step_4.png)
3232

3333
6. Open the .env file inside main and paste the API key
3434

@@ -123,4 +123,4 @@ if __name__ == "__main__":
123123
124124
Developed by
125125
126-
![logo-removebg-preview.png](doc/logo-removebg-preview.png)
126+
![logo-removebg-preview.png](docs/logo_vincios.png)
File renamed without changes.

getter.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import requests
22
from bs4 import BeautifulSoup
33

4-
54
HEADERS = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36',
65
'Accept-Language': 'en-US'}
76

8-
97
def get_function(link:str, param = HEADERS) -> str:
108
"""
119
It sends a GET request to the specified link with optional headers.
@@ -20,9 +18,6 @@ def get_function(link:str, param = HEADERS) -> str:
2018
response = requests.get(url=link, headers=HEADERS)
2119
return str(response.content)
2220

23-
24-
25-
2621
def scraper(link: str, max_char: int) -> str:
2722
"""
2823
Scrapes the HTML text and removes unwanted elements, text, and comments.

pydantic_class.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from langchain_core.pydantic_v1 import BaseModel, Field
32

43
class Response(BaseModel):

0 commit comments

Comments
 (0)