ScrapeGraphAI / Scrapegraph-ai

Python scraper based on AI
https://scrapegraphai.com
MIT License
15.87k stars 1.29k forks source link

Model not found when using Anthropic #813

Open matheus-rossi opened 2 days ago

matheus-rossi commented 2 days ago

Version: scrapegraphai@v1.31.0

Issue: Error encountered while using Anthropics models.

Problem: Despite receiving an error message, the process appears to function correctly. Is this something to be concerned about?

Describe the bug

Model anthropic/claude-3-5-haiku-latest not found,
                    using default token size (8192)

Code

 config = "llm": {
      "api_key": settings.ANTHROPIC_API_KEY,
      "model": "anthropic/claude-3-5-haiku-latest",
      "timeout": 120,
      "temperature": 0,
      "max_tokens": 8192
  },
  "verbose": verbose
}

or

 config = "llm": {
      "api_key": settings.ANTHROPIC_API_KEY,
      "model": "anthropic/claude-3-5-haiku-claude-3-5-haiku-20241022",
      "timeout": 120,
      "temperature": 0,
      "max_tokens": 8192
  },
  "verbose": verbose
}
VinciGit00 commented 2 days ago

Hi @matheus-rossi the reason that in this file https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/813-model-not-found-when-using-anthropic/scrapegraphai/helpers/models_tokens.py the model was not present, if you have any other model that is missing feel free to add it

matheus-rossi commented 2 days ago

Hi @matheus-rossi the reason that in this file https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/813-model-not-found-when-using-anthropic/scrapegraphai/helpers/models_tokens.py the model was not present, if you have any other model that is missing feel free to add it

Thank you I will add these models and create a PR

VinciGit00 commented 20 hours ago

hi please update to the new beta

VinciGit00 commented 6 hours ago

Hi @matheus-rossi please let me know