Skip to content

Fix schema option not working #946

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 14 commits into from
Mar 21, 2025
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
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
## [1.43.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.42.1...v1.43.0) (2025-03-13)


### Features

* add intrgration for o3min ([fc0a148](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/fc0a1480174e59e395232af123ad8ce64595e029))

## [1.42.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.42.0...v1.42.1) (2025-03-12)


### Bug Fixes

* add new gpt model ([cff799b](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/cff799b50d60089f175649eec00da1c5dceeed95))

## [1.42.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.41.0...v1.42.0) (2025-03-10)


### Features

* update terms ([ff7b33b](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/ff7b33b376720c81984142f2783f2e8729b5a525))

## [1.41.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.40.1...v1.41.0) (2025-03-09)


### Features

* add CLoD integration ([4e0e785](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/4e0e78582c3a75e64c5eba26ce40b5ffbf05d58e))


### Test

* Add coverage improvement test for tests/test_generate_answer_node.py ([6769c0d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/6769c0d43ab72f1c8b520dd28d19f747b22f9b7c))
* Add coverage improvement test for tests/test_models_tokens.py ([b21e781](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/b21e781ce340c7fa2c5a99a28b7c23e06e950f1e))
* Update coverage improvement test for tests/graphs/abstract_graph_test.py ([f296ac4](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/f296ac4d5088a74d4f50e7262631f202a68b152c))


### CI

* **release:** 1.41.0-beta.1 [skip ci] ([7bfe494](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/7bfe494237279d73cefe4161a0b8e95491329ccb))

## [1.41.0-beta.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.40.1...v1.41.0-beta.1) (2025-03-07)


Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The output will be a dictionary like the following:
"description": "ScrapeGraphAI transforms websites into clean, organized data for AI agents and data analytics. It offers an AI-powered API for effortless and cost-effective data extraction.",
"founders": [
{
"name": "Marco Perini",
"name": "",
"role": "Founder & Technical Lead",
"linkedin": "https://www.linkedin.com/in/perinim/"
},
Expand Down Expand Up @@ -193,7 +193,7 @@ We collect anonymous usage metrics to enhance our package's quality and user exp
If you have used our library for research purposes please quote us with the following reference:
```text
@misc{scrapegraph-ai,
author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},
author = {Lorenzo Padoan, Marco Vinciguerra},
title = {Scrapegraph-ai},
year = {2024},
url = {https://github.com/VinciGit00/Scrapegraph-ai},
Expand All @@ -203,14 +203,9 @@ If you have used our library for research purposes please quote us with the foll

## Authors

<p align="center">
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/logo_authors.png" alt="Authors_logos">
</p>

| | Contact Info |
|--------------------|----------------------|
| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |

## 📜 License
Expand Down
4 changes: 2 additions & 2 deletions docs/chinese.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ print(result)
如果您将我们的库用于研究目的,请引用以下参考文献:
```text
@misc{scrapegraph-ai,
author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},
author = {, Lorenzo Padoan, Marco Vinciguerra},
title = {Scrapegraph-ai},
year = {2024},
url = {https://github.com/VinciGit00/Scrapegraph-ai},
Expand All @@ -212,7 +212,7 @@ print(result)
| | Contact Info |
|--------------------|----------------------|
| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |

## 📜 许可证
Expand Down
4 changes: 2 additions & 2 deletions docs/japanese.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ print(result)
研究目的で当社のライブラリを使用する場合は、以下の参考文献を引用してください:
```text
@misc{scrapegraph-ai,
author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},
author = {, Lorenzo Padoan, Marco Vinciguerra},
title = {Scrapegraph-ai},
year = {2024},
url = {https://github.com/VinciGit00/Scrapegraph-ai},
Expand All @@ -212,7 +212,7 @@ print(result)
| | 連絡先 |
|--------------------|----------------------|
| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |

## 📜 ライセンス
Expand Down
4 changes: 2 additions & 2 deletions docs/korean.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ graph LR
우리의 라이브러리를 연구 목적으로 사용한 경우 다음과 같이 인용해 주세요:
```text
@misc{scrapegraph-ai,
author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},
author = {, Lorenzo Padoan, Marco Vinciguerra},
title = {Scrapegraph-ai},
year = {2024},
url = {https://github.com/VinciGit00/Scrapegraph-ai},
Expand All @@ -228,7 +228,7 @@ graph LR
| | 연락처 |
|--------------------|---------------|
| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |

## 📜 라이선스
Expand Down
2 changes: 1 addition & 1 deletion docs/russian.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ print(result)
| | Контактная информация |
|--------------------|------------------------|
| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |

## 📜 Лицензия
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

project = "ScrapeGraphAI"
copyright = "2024, ScrapeGraphAI"
author = "Marco Vinciguerra, Marco Perini, Lorenzo Padoan"
author = "Marco Vinciguerra, , Lorenzo Padoan"

html_last_updated_fmt = "%b %d, %Y"

Expand Down
4 changes: 2 additions & 2 deletions docs/turkish.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Kütüphanemizi araştırma amaçlı kullandıysanız, lütfen bizi aşağıdaki

```text
@misc{scrapegraph-ai,
author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},
author = {, Lorenzo Padoan, Marco Vinciguerra},
title = {Scrapegraph-ai},
year = {2024},
url = {https://github.com/VinciGit00/Scrapegraph-ai},
Expand All @@ -165,7 +165,7 @@ Kütüphanemizi araştırma amaçlı kullandıysanız, lütfen bizi aşağıdaki
| | İletişim Bilgileri |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Marco Vinciguerra | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/marco-vinciguerra-7ba365242/) |
| Marco Perini | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/perinim/) |
| Lorenzo Padoan | [![Linkedin Badge](https://img.shields.io/badge/-Linkedin-blue?style=flat&logo=Linkedin&logoColor=white)](https://www.linkedin.com/in/lorenzo-padoan-4521a2154/) |

## 📜 Lisans
Expand Down
2 changes: 1 addition & 1 deletion examples/ScrapegraphAI_cookbook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
"text": [
"{\n",
" \"summary\": {\n",
" \"title\": \"Projects | Marco Perini\",\n",
" \"title\": \"Projects | \",\n",
" \"projects\": [\n",
" {\n",
" \"title\": \"Rotary Pendulum RL\",\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</div>
</div>
<footer class="fixed-bottom">
<div class="container mt-0"> © Copyright 2023 Marco Perini. Powered by <a href="https://jekyllrb.com/" target="_blank" rel="external nofollow noopener">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio" rel="external nofollow noopener" target="_blank">al-folio</a> theme. Hosted by <a href="https://pages.github.com/" target="_blank" rel="external nofollow noopener">GitHub Pages</a>. </div>
<div class="container mt-0"> © Copyright 2023 . Powered by <a href="https://jekyllrb.com/" target="_blank" rel="external nofollow noopener">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio" rel="external nofollow noopener" target="_blank">al-folio</a> theme. Hosted by <a href="https://pages.github.com/" target="_blank" rel="external nofollow noopener">GitHub Pages</a>. </div>
</footer>
<div class="hiddendiv common"></div>
</body>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Marco Perini Toggle navigation
Toggle navigation

* About
* Projects(current)
Expand Down Expand Up @@ -30,6 +30,6 @@ surroundings, considering uncertainties in their readings.
Drones Modular drone architecture proposal and proof of concept. The project
received maximum grade. ](/projects/wireless-esc-drone/)

© Copyright 2023 Marco Perini. Powered by Jekyll with
© Copyright 2023 . Powered by Jekyll with
al-folio theme. Hosted by [GitHub
Pages](https://pages.github.com/).
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</div>
</div>
<footer class="fixed-bottom">
<div class="container mt-0"> © Copyright 2023 Marco Perini. Powered by <a href="https://jekyllrb.com/" target="_blank" rel="external nofollow noopener">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio" rel="external nofollow noopener" target="_blank">al-folio</a> theme. Hosted by <a href="https://pages.github.com/" target="_blank" rel="external nofollow noopener">GitHub Pages</a>. </div>
<div class="container mt-0"> © Copyright 2023 . Powered by <a href="https://jekyllrb.com/" target="_blank" rel="external nofollow noopener">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio" rel="external nofollow noopener" target="_blank">al-folio</a> theme. Hosted by <a href="https://pages.github.com/" target="_blank" rel="external nofollow noopener">GitHub Pages</a>. </div>
</footer>
<div class="hiddendiv common"></div>
</body>
2 changes: 1 addition & 1 deletion examples/extras/cond_smartscraper_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# *******************************************************

multiple_search_graph = SmartScraperGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source="https://perinim.github.io/",
schema=None,
config=graph_config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

smart_scraper_lite_graph = SmartScraperLiteGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source="https://perinim.github.io/",
config=graph_config,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# *******************************************************

multiple_search_graph = SmartScraperMultiConcatGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source=["https://perinim.github.io/", "https://perinim.github.io/cv/"],
schema=None,
config=graph_config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# ************************************************

smart_scraper_multi_lite_graph = SmartScraperMultiLiteGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source=["https://perinim.github.io/", "https://perinim.github.io/cv/"],
config=graph_config,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# *******************************************************

multiple_search_graph = SmartScraperMultiGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source=["https://perinim.github.io/", "https://perinim.github.io/cv/"],
schema=None,
config=graph_config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}

smart_scraper_lite_graph = SmartScraperLiteGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source="https://perinim.github.io/",
config=graph_config,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# *******************************************************

multiple_search_graph = SmartScraperMultiConcatGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source=["https://perinim.github.io/", "https://perinim.github.io/cv/"],
schema=None,
config=graph_config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# ************************************************

smart_scraper_multi_lite_graph = SmartScraperMultiLiteGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source=["https://perinim.github.io/", "https://perinim.github.io/cv/"],
config=graph_config,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# *******************************************************

multiple_search_graph = SmartScraperMultiGraph(
prompt="Who is Marco Perini?",
prompt="Who is ?",
source=["https://perinim.github.io/", "https://perinim.github.io/cv/"],
schema=None,
config=graph_config,
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[project]
name = "scrapegraphai"

version = "1.41.0b1"
version = "1.43.0"



description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines."
authors = [
{ name = "Marco Vinciguerra", email = "mvincig11@gmail.com" },
{ name = "Marco Perini", email = "perinim.98@gmail.com" },
{ name = "Lorenzo Padoan", email = "lorenzo.padoan977@gmail.com" }
]

Expand All @@ -32,7 +31,8 @@ dependencies = [
"async-timeout>=4.0.3",
"simpleeval>=1.0.0",
"jsonschema>=4.23.0",
"duckduckgo-search>=7.2.1"
"duckduckgo-search>=7.2.1",
"pydantic>=2.10.2",
]

readme = "README.md"
Expand Down
5 changes: 1 addition & 4 deletions scrapegraphai/graphs/abstract_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ def __init__(
source: Optional[str] = None,
schema: Optional[Type[BaseModel]] = None,
):
if config.get("llm").get("temperature") is None:
config["llm"]["temperature"] = 0

self.prompt = prompt
self.source = source
self.config = config
Expand Down Expand Up @@ -125,7 +122,7 @@ def _create_llm(self, llm_config: dict) -> object:
KeyError: If the model is not supported.
"""

llm_defaults = {"temperature": 0, "streaming": False}
llm_defaults = {"streaming": False}
llm_params = {**llm_defaults, **llm_config}
rate_limit_params = llm_params.pop("rate_limit", {})

Expand Down
2 changes: 1 addition & 1 deletion scrapegraphai/graphs/smart_scraper_multi_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SmartScraperMultiGraph(AbstractGraph):

Example:
>>> smart_scraper_multi_graph = SmartScraperMultiGraph(
... prompt="Who is Marco Perini?",
... prompt="Who is ?",
... source= [
... "https://perinim.github.io/",
... "https://perinim.github.io/cv/"
Expand Down
2 changes: 1 addition & 1 deletion scrapegraphai/graphs/smart_scraper_multi_lite_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SmartScraperMultiLiteGraph(AbstractGraph):

Example:
>>> smart_scraper_multi_lite_graph = SmartScraperMultiLiteGraph(
... prompt="Who is Marco Perini?",
... prompt="Who is ?",
... source= [
... "https://perinim.github.io/",
... "https://perinim.github.io/cv/"
Expand Down
3 changes: 3 additions & 0 deletions scrapegraphai/helpers/models_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
"gpt-4o-2024-08-06": 128000,
"gpt-4o-2024-05-13": 128000,
"gpt-4o-mini": 128000,
"gpt-4.5": 128000,
"gpt-4.5-preview": 128000,
"o1-preview": 128000,
"o1-mini": 128000,
"o3-mini": 200000,
},
"azure_openai": {
"gpt-3.5-turbo-0125": 16385,
Expand Down
Loading
Loading