File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 16
16
sys .path .append ("." )
17
17
18
18
19
+ def test_mistral_model ():
20
+ from langchain_core .messages import HumanMessage
21
+ from src .utils import utils
22
+
23
+ llm = utils .get_llm_model (
24
+ provider = "mistral" ,
25
+ model_name = "mistral-large-latest" ,
26
+ temperature = 0.8 ,
27
+ base_url = os .getenv ("MISTRAL_ENDPOINT" , "" ),
28
+ api_key = os .getenv ("MISTRAL_API_KEY" , "" )
29
+ )
30
+ message = HumanMessage (
31
+ content = [
32
+ {"type" : "text" , "text" : "who are you?" }
33
+ ]
34
+ )
35
+ ai_msg = llm .invoke ([message ])
36
+ print (ai_msg .content )
37
+
19
38
def test_openai_model ():
20
39
from langchain_core .messages import HumanMessage
21
40
from src .utils import utils
@@ -128,4 +147,5 @@ def test_ollama_model():
128
147
# test_gemini_model()
129
148
# test_azure_openai_model()
130
149
# test_deepseek_model()
131
- test_ollama_model ()
150
+ # test_ollama_model()
151
+ test_mistral_model ()
You can’t perform that action at this time.
0 commit comments