File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
from langchain_core .prompts import ChatPromptTemplate
6
6
from langchain .chains import create_extraction_chain
7
- from .. models import Gemini
8
- from .. helpers import nodes_metadata , graph_schema
7
+ from langchain_community . chat_models import ErnieBotChat
8
+ from langchain_google_genai import ChatGoogleGenerativeAI
9
9
from langchain_openai import ChatOpenAI
10
10
11
+ from ..helpers import nodes_metadata , graph_schema
12
+
11
13
class GraphBuilder :
12
14
"""
13
15
GraphBuilder is a dynamic tool for constructing web scraping graphs based on user prompts.
@@ -72,9 +74,9 @@ def _create_llm(self, llm_config: dict):
72
74
if "gpt-" in llm_params ["model" ]:
73
75
return ChatOpenAI (llm_params )
74
76
elif "gemini" in llm_params ["model" ]:
75
- return Gemini (llm_params )
77
+ return ChatGoogleGenerativeAI (llm_params )
76
78
elif "ernie" in llm_params ["model" ]:
77
- return Ernie (llm_params )
79
+ return ErnieBotChat (llm_params )
78
80
raise ValueError ("Model not supported" )
79
81
80
82
def _generate_nodes_description (self ):
You can’t perform that action at this time.
0 commit comments