mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-12 21:01:56 +08:00
Merge pull request #693 from ScrapeGraphAI/togheter_fixing
Togheter fixing
This commit is contained in:
commit
a557f13a09
@ -154,12 +154,13 @@ class AbstractGraph(ABC):
|
||||
try:
|
||||
self.model_token = models_tokens[llm_params["model_provider"]][llm_params["model"]]
|
||||
except KeyError:
|
||||
print(f"""Model {llm_params['model_provider']}/{llm_params['model']} not found,
|
||||
print(f"""Model {llm_params['model_provider']}/{llm_params['model']} not found,
|
||||
using default token size (8192)""")
|
||||
self.model_token = 8192
|
||||
|
||||
try:
|
||||
if llm_params["model_provider"] not in {"oneapi","nvidia","ernie","deepseek","togetherai"}:
|
||||
if llm_params["model_provider"] not in \
|
||||
{"oneapi","nvidia","ernie","deepseek","togetherai"}:
|
||||
if llm_params["model_provider"] == "bedrock":
|
||||
llm_params["model_kwargs"] = { "temperature" : llm_params.pop("temperature") }
|
||||
with warnings.catch_warnings():
|
||||
@ -195,7 +196,7 @@ class AbstractGraph(ABC):
|
||||
return ChatNVIDIA(**llm_params)
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error instancing model: {e}")
|
||||
raise Exception(f"Error instancing model: {e}")
|
||||
|
||||
|
||||
def get_state(self, key=None) -> dict:
|
||||
|
||||
@ -131,9 +131,21 @@ models_tokens = {
|
||||
"gemma-7b-it": 8192,
|
||||
"claude-3-haiku-20240307'": 8192,
|
||||
},
|
||||
"togheterai": {
|
||||
"toghetherai": {
|
||||
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": 128000,
|
||||
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 128000
|
||||
"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo": 128000,
|
||||
"mistralai/Mixtral-8x22B-Instruct-v0.1": 128000,
|
||||
"stabilityai/stable-diffusion-xl-base-1.0": 2048,
|
||||
"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo": 128000,
|
||||
"NousResearch/Hermes-3-Llama-3.1-405B-Turbo": 128000,
|
||||
"Gryphe/MythoMax-L2-13b-Lite": 8192,
|
||||
"Salesforce/Llama-Rank-V1": 8192,
|
||||
"meta-llama/Meta-Llama-Guard-3-8B": 128000,
|
||||
"meta-llama/Meta-Llama-3-70B-Instruct-Turbo": 128000,
|
||||
"meta-llama/Llama-3-8b-chat-hf": 8192,
|
||||
"meta-llama/Llama-3-70b-chat-hf": 8192,
|
||||
"Qwen/Qwen2-72B-Instruct": 128000,
|
||||
"google/gemma-2-27b-it": 8192
|
||||
},
|
||||
"anthropic": {
|
||||
"claude_instant": 100000,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user