Skip to content

Commit b0ffc51

Browse files
committed
chore(examples): fix Mistral examples
1 parent 786af99 commit b0ffc51

File tree

2 files changed

+3
-61
lines changed

2 files changed

+3
-61
lines changed

examples/mistral/custom_graph_mistral.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import os
66
from dotenv import load_dotenv
77

8-
from langchain_openai import OpenAIEmbeddings
9-
from scrapegraphai.models import OpenAI
8+
from langchain_mistralai import ChatMistralAI, MistralAIEmbeddings
109
from scrapegraphai.graphs import BaseGraph
1110
from scrapegraphai.nodes import FetchNode, ParseNode, RAGNode, GenerateAnswerNode, RobotsNode
1211
load_dotenv()
@@ -27,8 +26,8 @@
2726
# Define the graph nodes
2827
# ************************************************
2928

30-
llm_model = OpenAI(graph_config["llm"])
31-
embedder = OpenAIEmbeddings(api_key=llm_model.openai_api_key)
29+
llm_model = ChatMistralAI(**graph_config["llm"])
30+
embedder = MistralAIEmbeddings(api_key=llm_model.mistral_api_key)
3231

3332
# define the nodes for the graph
3433
robot_node = RobotsNode(

examples/mistral/speech_graph_mistral.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)