Skip to content

Commit a557f13

Browse files
authored
Merge pull request #693 from ScrapeGraphAI/togheter_fixing
Togheter fixing
2 parents 1ffdd3f + 3876cb7 commit a557f13

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

scrapegraphai/graphs/abstract_graph.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,13 @@ def _create_llm(self, llm_config: dict) -> object:
154154
try:
155155
self.model_token = models_tokens[llm_params["model_provider"]][llm_params["model"]]
156156
except KeyError:
157-
print(f"""Model {llm_params['model_provider']}/{llm_params['model']} not found,
157+
print(f"""Model {llm_params['model_provider']}/{llm_params['model']} not found,
158158
using default token size (8192)""")
159159
self.model_token = 8192
160160

161161
try:
162-
if llm_params["model_provider"] not in {"oneapi","nvidia","ernie","deepseek","togetherai"}:
162+
if llm_params["model_provider"] not in \
163+
{"oneapi","nvidia","ernie","deepseek","togetherai"}:
163164
if llm_params["model_provider"] == "bedrock":
164165
llm_params["model_kwargs"] = { "temperature" : llm_params.pop("temperature") }
165166
with warnings.catch_warnings():
@@ -195,7 +196,7 @@ def _create_llm(self, llm_config: dict) -> object:
195196
return ChatNVIDIA(**llm_params)
196197

197198
except Exception as e:
198-
print(f"Error instancing model: {e}")
199+
raise Exception(f"Error instancing model: {e}")
199200

200201

201202
def get_state(self, key=None) -> dict:

scrapegraphai/helpers/models_tokens.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,21 @@
131131
"gemma-7b-it": 8192,
132132
"claude-3-haiku-20240307'": 8192,
133133
},
134-
"togheterai": {
134+
"toghetherai": {
135135
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": 128000,
136-
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 128000
136+
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 128000,
137+
"mistralai/Mixtral-8x22B-Instruct-v0.1": 128000,
138+
"stabilityai/stable-diffusion-xl-base-1.0": 2048,
139+
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": 128000,
140+
"NousResearch/Hermes-3-Llama-3.1-405B-Turbo": 128000,
141+
"Gryphe/MythoMax-L2-13b-Lite": 8192,
142+
"Salesforce/Llama-Rank-V1": 8192,
143+
"meta-llama/Meta-Llama-Guard-3-8B": 128000,
144+
"meta-llama/Meta-Llama-3-70B-Instruct-Turbo": 128000,
145+
"meta-llama/Llama-3-8b-chat-hf": 8192,
146+
"meta-llama/Llama-3-70b-chat-hf": 8192,
147+
"Qwen/Qwen2-72B-Instruct": 128000,
148+
"google/gemma-2-27b-it": 8192
137149
},
138150
"anthropic": {
139151
"claude_instant": 100000,

0 commit comments

Comments
 (0)