Skip to content

Refactoring of the project #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
API_KEY="your openai.com api key"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.DS_Store
.DS_Store?
._*
__pycache__/
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Follow the following steps:
3. Go to [https://openai.com](https://openai.com/) and login
4. Now you can access to [https://platform.openai.com/docs/overview](https://platform.openai.com/docs/overview)
5. Create a new API key and copy it
![Screenshot 2024-01-26 alle 17.10.10.png](doc/Screenshot_2024-01-26_alle_17.10.10.png)
![Screenshot 2024-01-26 alle 17.10.10.png](docs/generate_api_key/step_1.png)

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

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

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

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

Expand Down Expand Up @@ -123,4 +123,4 @@ if __name__ == "__main__":

Developed by

![logo-removebg-preview.png](doc/logo-removebg-preview.png)
![logo-removebg-preview.png](docs/logo_vincios.png)
File renamed without changes
5 changes: 0 additions & 5 deletions getter.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import requests
from bs4 import BeautifulSoup


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


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




def scraper(link: str, max_char: int) -> str:
"""
Scrapes the HTML text and removes unwanted elements, text, and comments.
Expand Down
1 change: 0 additions & 1 deletion pydantic_class.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from langchain_core.pydantic_v1 import BaseModel, Field

class Response(BaseModel):
Expand Down