Scrapegraph-ai icon indicating copy to clipboard operation
Scrapegraph-ai copied to clipboard

Not able to run Anthropic Claude models.

Open paarthmadan-avataar opened this issue 1 year ago • 4 comments

KeyError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/scrapegraphai/graphs/abstract_graph.py in _create_llm(self, llm_config, chat) 181 try: --> 182 self.model_token = models_tokens["claude"][llm_params["model"]] 183 except KeyError as exc:

KeyError: 'claude-3-haiku-20240307'

The above exception was the direct cause of the following exception:

KeyError Traceback (most recent call last) 3 frames /usr/local/lib/python3.10/dist-packages/scrapegraphai/graphs/abstract_graph.py in _create_llm(self, llm_config, chat) 182 self.model_token = models_tokens["claude"][llm_params["model"]] 183 except KeyError as exc: --> 184 raise KeyError("Model not supported") from exc 185 return Anthropic(llm_params) 186 elif "ollama" in llm_params["model"]:

KeyError: 'Model not supported'

paarthmadan-avataar avatar Jun 21 '24 09:06 paarthmadan-avataar

please update

VinciGit00 avatar Jun 21 '24 12:06 VinciGit00

Can you share the a correct claude api model names to key in the graph config?

paarthmadan-avataar avatar Jun 23 '24 08:06 paarthmadan-avataar

Still getting this error. I tried with 1.7.4 and 1.8.0-beta.1

self.model_token = models_tokens["claude"][llm_params["model"]]

KeyError: 'claude-3-haiku-20240307'

GRiDD avatar Jun 28 '24 00:06 GRiDD

hi, please install the new version, we added that model.

VinciGit00 avatar Jun 28 '24 08:06 VinciGit00