File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
from langchain .chat_models .base import BaseChatModel
4
4
from langchain_anthropic import ChatAnthropic
5
+ from langchain_ollama import ChatOllama
5
6
from langchain_community .llms import Ollama
6
7
from langchain_fireworks import ChatFireworks
7
8
from langchain_openai import ChatOpenAI
@@ -23,6 +24,8 @@ def _get_model(model: Union[str, BaseChatModel]) -> BaseChatModel:
23
24
24
25
if model == "openai" :
25
26
return ChatOpenAI (temperature = 0 , model = "gpt-4o" )
27
+ elif model == "ollama3.2" :
28
+ return ChatOllama (model = "llama3.2" )
26
29
elif model == "anthropic" :
27
30
return ChatAnthropic (temperature = 0 , model_name = "claude-3-sonnet-20240229" )
28
31
elif model == "fireworks" :
@@ -31,5 +34,8 @@ def _get_model(model: Union[str, BaseChatModel]) -> BaseChatModel:
31
34
)
32
35
elif model == "llama3.1:8b-brick" :
33
36
return Ollama (model = "llama3.1:8b-brick-v8" )
37
+ elif model == "hf.co/Giudice7/llama32-3B-brick-demo:latest" :
38
+ return Ollama (model = "hf.co/Giudice7/llama32-3B-brick-demo:latest" )
39
+
34
40
else :
35
- raise ValueError (f"Unsupported model type: { model } " )
41
+ raise ValueError (f"Unsupported model type: { model } . Load your own BaseChatModel if this one is not supported. " )
You can’t perform that action at this time.
0 commit comments