mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
feat: add togheterai
This commit is contained in:
parent
dbec55064f
commit
8f615adef3
@ -36,7 +36,7 @@ By the way if you to use not mandatory modules it is necessary to install by you
|
|||||||
|
|
||||||
### Installing "Other Language Models"
|
### Installing "Other Language Models"
|
||||||
|
|
||||||
This group allows you to use additional language models like Fireworks, Groq, Anthropic, Hugging Face, and Nvidia AI Endpoints.
|
This group allows you to use additional language models like Fireworks, Groq, Anthropic, togheterai, Hugging Face, and Nvidia AI Endpoints.
|
||||||
```bash
|
```bash
|
||||||
pip install scrapegraphai[other-language-models]
|
pip install scrapegraphai[other-language-models]
|
||||||
|
|
||||||
|
|||||||
@ -77,6 +77,7 @@ other-language-models = [
|
|||||||
"langchain-anthropic>=0.1.11",
|
"langchain-anthropic>=0.1.11",
|
||||||
"langchain-huggingface>=0.0.3",
|
"langchain-huggingface>=0.0.3",
|
||||||
"langchain-nvidia-ai-endpoints>=0.1.6",
|
"langchain-nvidia-ai-endpoints>=0.1.6",
|
||||||
|
"together==1.2.9"
|
||||||
]
|
]
|
||||||
|
|
||||||
# Group 2: More Semantic Options
|
# Group 2: More Semantic Options
|
||||||
|
|||||||
@ -157,10 +157,14 @@ class AbstractGraph(ABC):
|
|||||||
from langchain_community.chat_models import ErnieBotChat
|
from langchain_community.chat_models import ErnieBotChat
|
||||||
return ErnieBotChat(**llm_params)
|
return ErnieBotChat(**llm_params)
|
||||||
|
|
||||||
if llm_params["model_provider"] == "oneapi":
|
elif llm_params["model_provider"] == "oneapi":
|
||||||
return OneApi(**llm_params)
|
return OneApi(**llm_params)
|
||||||
|
|
||||||
if llm_params["model_provider"] == "nvidia":
|
elif llm_params["model_provider"] == "togehterai":
|
||||||
|
from langhcain_together import ChatTogether
|
||||||
|
return ChatTogether(**llm_params)
|
||||||
|
|
||||||
|
elif llm_params["model_provider"] == "nvidia":
|
||||||
try:
|
try:
|
||||||
from langchain_nvidia_ai_endpoints import ChatNVIDIA
|
from langchain_nvidia_ai_endpoints import ChatNVIDIA
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|||||||
@ -127,6 +127,9 @@ models_tokens = {
|
|||||||
"gemma-7b-it": 8192,
|
"gemma-7b-it": 8192,
|
||||||
"claude-3-haiku-20240307'": 8192,
|
"claude-3-haiku-20240307'": 8192,
|
||||||
},
|
},
|
||||||
|
"togheterai": {
|
||||||
|
"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo": 128000
|
||||||
|
},
|
||||||
"anthropic": {
|
"anthropic": {
|
||||||
"claude_instant": 100000,
|
"claude_instant": 100000,
|
||||||
"claude2": 9000,
|
"claude2": 9000,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user