mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
Fixes #752 Fix the issue with loading the tokenizer for 'gpt2'. * **scrapegraphai/utils/tokenizer.py** - Add a check for `GPT2TokenizerFast` in the `num_tokens_calculus` function. - Import `GPT2TokenizerFast` from `transformers`. * **scrapegraphai/utils/tokenizers/tokenizer_ollama.py** - Modify the `num_tokens_ollama` function to handle `GPT2TokenizerFast`. * **tests/graphs/smart_scraper_ollama_test.py** - Add a test case to verify the tokenizer loading for `GPT2TokenizerFast`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ScrapeGraphAI/Scrapegraph-ai/issues/752?shareId=XXXX-XXXX-XXXX-XXXX). |
||
|---|---|---|
| .. | ||
| inputs | ||
| .env.example | ||
| abstract_graph_test.py | ||
| code_generator_graph_openai_test.py | ||
| depth_search_graph_openai_test.py | ||
| scrape_plain_text_mistral_test.py | ||
| scrape_xml_ollama_test.py | ||
| screenshot_scraper_test.py | ||
| script_generator_test.py | ||
| search_graph_openai_test.py | ||
| search_link_ollama.py | ||
| smart_scraper_ernie_test.py | ||
| smart_scraper_fireworks_test.py | ||
| smart_scraper_ollama_test.py | ||
| smart_scraper_openai_test.py | ||
| xml_scraper_openai_test.py | ||