From ee8f8b31ecfe4ffd311528d2f48cb055e4609d99 Mon Sep 17 00:00:00 2001 From: Marco Vinciguerra Date: Sat, 24 Aug 2024 21:25:55 +0200 Subject: [PATCH 1/3] fix: add claude3.5 sonnet --- scrapegraphai/helpers/models_tokens.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scrapegraphai/helpers/models_tokens.py b/scrapegraphai/helpers/models_tokens.py index e0b936ae..711aa75f 100644 --- a/scrapegraphai/helpers/models_tokens.py +++ b/scrapegraphai/helpers/models_tokens.py @@ -133,6 +133,7 @@ "gemini-1.0-pro": 128000 }, "bedrock": { + "anthropic.claude-3-5-sonnet-20240620": 200000, "anthropic.claude-3-haiku-20240307-v1:0": 200000, "anthropic.claude-3-sonnet-20240229-v1:0": 200000, "anthropic.claude-3-opus-20240229-v1:0": 200000, From 88e76ceedb39dc1b41222e9a5cb8a6f0d81cadf4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sat, 24 Aug 2024 19:27:20 +0000 Subject: [PATCH 2/3] ci(release): 1.14.1 [skip ci] ## [1.14.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.14.0...v1.14.1) (2024-08-24) ### Bug Fixes * add claude3.5 sonnet ([ee8f8b3](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/ee8f8b31ecfe4ffd311528d2f48cb055e4609d99)) ### Docs * added sponsors ([b3a2d0d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/b3a2d0d65a41f6e645fac3fc84f702fdf64b951c)) --- CHANGELOG.md | 12 ++++++++++++ pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29dccceb..0433c0a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [1.14.1](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.14.0...v1.14.1) (2024-08-24) + + +### Bug Fixes + +* add claude3.5 sonnet ([ee8f8b3](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/ee8f8b31ecfe4ffd311528d2f48cb055e4609d99)) + + +### Docs + +* added sponsors ([b3a2d0d](https://github.com/ScrapeGraphAI/Scrapegraph-ai/commit/b3a2d0d65a41f6e645fac3fc84f702fdf64b951c)) + ## [1.14.0](https://github.com/ScrapeGraphAI/Scrapegraph-ai/compare/v1.13.3...v1.14.0) (2024-08-20) diff --git a/pyproject.toml b/pyproject.toml index 0bc81090..d47f9b29 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "scrapegraphai" -version = "1.14.0" +version = "1.14.1" description = "A web scraping library based on LangChain which uses LLM and direct graph logic to create scraping pipelines." From 35b994a8cd201bcde86038dcde6933946a4fe84f Mon Sep 17 00:00:00 2001 From: Jamie Beck Date: Mon, 26 Aug 2024 11:30:09 -0400 Subject: [PATCH 3/3] fix model_tokens not being used for ollama I am passing in the explicit model_tokens from user config as the default_token so it will correctly fallback to the users setting if the model is not found --- scrapegraphai/graphs/abstract_graph.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scrapegraphai/graphs/abstract_graph.py b/scrapegraphai/graphs/abstract_graph.py index ae1e90b2..e76a2ed7 100644 --- a/scrapegraphai/graphs/abstract_graph.py +++ b/scrapegraphai/graphs/abstract_graph.py @@ -174,8 +174,9 @@ def handle_model(model_name, provider, token_key, default_token=8192): elif "ollama" in llm_params["model"]: model_name = llm_params["model"].split("ollama/")[-1] - token_key = model_name if "model_tokens" not in llm_params else llm_params["model_tokens"] - return handle_model(model_name, "ollama", token_key) + token_key = model_name if "model_tokens" not in llm_params else None + explicit_model_tokens = 8192 if "model_tokens" not in llm_params else llm_params["model_tokens"] + return handle_model(model_name, "ollama", token_key, explicit_model_tokens) elif "claude-3-" in llm_params["model"]: return handle_model(llm_params["model"], "anthropic", "claude3") @@ -271,4 +272,4 @@ def _create_graph(self): def run(self) -> str: """ Abstract method to execute the graph and return the result. - """ \ No newline at end of file + """