mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
chore(examples): update model names
This commit is contained in:
parent
f73343f193
commit
f6df9b7512
@ -26,8 +26,8 @@ text = pd.read_csv(file_path)
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -32,9 +32,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -5,10 +5,9 @@ Example of custom graph using existing nodes
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from langchain_openai import OpenAIEmbeddings
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langchain_anthropic import ChatAnthropic
|
||||
from scrapegraphai.graphs import BaseGraph
|
||||
from scrapegraphai.nodes import FetchNode, ParseNode, RAGNode, GenerateAnswerNode, RobotsNode
|
||||
from scrapegraphai.nodes import FetchNode, ParseNode, GenerateAnswerNode, RobotsNode
|
||||
load_dotenv()
|
||||
|
||||
# ************************************************
|
||||
@ -19,16 +18,14 @@ graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
# Define the graph nodes
|
||||
# ************************************************
|
||||
|
||||
llm_model = OpenAI(graph_config["llm"])
|
||||
embedder = OpenAIEmbeddings(api_key=llm_model.openai_api_key)
|
||||
llm_model = ChatAnthropic(graph_config["llm"])
|
||||
|
||||
# define the nodes for the graph
|
||||
robot_node = RobotsNode(
|
||||
@ -57,15 +54,6 @@ parse_node = ParseNode(
|
||||
"verbose": True,
|
||||
}
|
||||
)
|
||||
rag_node = RAGNode(
|
||||
input="user_prompt & (parsed_doc | doc)",
|
||||
output=["relevant_chunks"],
|
||||
node_config={
|
||||
"llm_model": llm_model,
|
||||
"embedder_model": embedder,
|
||||
"verbose": True,
|
||||
}
|
||||
)
|
||||
generate_answer_node = GenerateAnswerNode(
|
||||
input="user_prompt & (relevant_chunks | parsed_doc | doc)",
|
||||
output=["answer"],
|
||||
@ -84,14 +72,12 @@ graph = BaseGraph(
|
||||
robot_node,
|
||||
fetch_node,
|
||||
parse_node,
|
||||
rag_node,
|
||||
generate_answer_node,
|
||||
],
|
||||
edges=[
|
||||
(robot_node, fetch_node),
|
||||
(fetch_node, parse_node),
|
||||
(parse_node, rag_node),
|
||||
(rag_node, generate_answer_node)
|
||||
(parse_node, generate_answer_node)
|
||||
],
|
||||
entry_point=robot_node
|
||||
)
|
||||
|
||||
@ -26,9 +26,8 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -11,9 +11,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
FILE_NAME = "inputs/example.json"
|
||||
|
||||
@ -14,9 +14,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
source = """
|
||||
|
||||
@ -11,9 +11,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ***************
|
||||
|
||||
@ -28,9 +28,8 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -16,9 +16,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -16,10 +16,9 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -15,9 +15,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -27,8 +27,8 @@ class Dishes(BaseModel):
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -14,23 +14,11 @@ from langchain_openai import AzureOpenAIEmbeddings
|
||||
|
||||
load_dotenv()
|
||||
|
||||
llm_model_instance = AzureChatOpenAI(
|
||||
openai_api_version=os.environ["AZURE_OPENAI_API_VERSION"],
|
||||
azure_deployment=os.environ["AZURE_OPENAI_CHAT_DEPLOYMENT_NAME"]
|
||||
)
|
||||
|
||||
embedder_model_instance = AzureOpenAIEmbeddings(
|
||||
azure_deployment=os.environ["AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT_NAME"],
|
||||
openai_api_version=os.environ["AZURE_OPENAI_API_VERSION"],
|
||||
)
|
||||
|
||||
# ************************************************
|
||||
# Create the SmartScraperGraph instance and run it
|
||||
# ************************************************
|
||||
|
||||
graph_config = {
|
||||
"llm": {"model_instance": llm_model_instance},
|
||||
"embeddings": {"model_instance": embedder_model_instance}
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -19,9 +19,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
smart_scraper_graph = SmartScraperGraph(
|
||||
|
||||
@ -17,9 +17,8 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# *******************************************************
|
||||
|
||||
@ -33,8 +33,8 @@ class Projects(BaseModel):
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
smart_scraper_graph = SmartScraperGraph(
|
||||
|
||||
@ -26,8 +26,8 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -26,9 +26,8 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("ANTHROPIC_API_KEY"),
|
||||
"model": "claude-3-haiku-20240307",
|
||||
"max_tokens": 4000
|
||||
},
|
||||
"model": "anthropic/claude-3-haiku-20240307",
|
||||
},
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -27,7 +27,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -27,7 +27,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -26,7 +26,7 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -12,7 +12,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -17,7 +17,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -12,7 +12,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -28,7 +28,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -17,7 +17,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -17,7 +17,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -15,7 +15,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -31,7 +31,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -16,7 +16,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -18,7 +18,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -16,7 +16,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -30,7 +30,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -28,7 +28,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -27,7 +27,7 @@ deepseek_key = os.getenv("DEEPSEEK_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "deepseek-chat",
|
||||
"model": "deepseek/deepseek-chat",
|
||||
"openai_api_key": deepseek_key,
|
||||
"openai_api_base": 'https://api.deepseek.com/v1',
|
||||
},
|
||||
|
||||
@ -25,16 +25,12 @@ text = pd.read_csv(file_path)
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434",}
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
}
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
# Create the CSVScraperGraph instance and run it
|
||||
|
||||
@ -14,24 +14,20 @@ from scrapegraphai.nodes import FetchNode, ParseNode, RAGNode, GenerateAnswerNod
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434",}
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
}
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
# Define the graph nodes
|
||||
# ************************************************
|
||||
|
||||
llm_model = OpenAI(graph_config["llm"])
|
||||
llm_model = ChatOpenAI(graph_config["llm"])
|
||||
embedder = OpenAIEmbeddings(api_key=llm_model.openai_api_key)
|
||||
|
||||
# define the nodes for the graph
|
||||
|
||||
@ -18,7 +18,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
|
||||
@ -21,17 +21,13 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434"}
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
}
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -7,16 +7,12 @@ from scrapegraphai.graphs import PDFScraperGraph
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434",}
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
}
|
||||
}
|
||||
|
||||
source = """
|
||||
The Divine Comedy, Italian La Divina Commedia, original name La commedia, long narrative poem written in Italian
|
||||
|
||||
@ -25,17 +25,13 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434",}
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
}
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -13,12 +13,12 @@ load_dotenv()
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
openai_key = os.getenv("OPENAI_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
@ -9,17 +9,13 @@ from scrapegraphai.utils import prettify_exec_info
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
graph_config = {
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434"},
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
|
||||
@ -12,17 +12,13 @@ load_dotenv()
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
graph_config = {
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434"},
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
|
||||
@ -8,17 +8,13 @@ from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_i
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
graph_config = {
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434"},
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
|
||||
@ -14,15 +14,14 @@ load_dotenv()
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
openai_key = os.getenv("OPENAI_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"verbose": False,
|
||||
"headless": False,
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
# ************************************************
|
||||
|
||||
@ -12,12 +12,12 @@ load_dotenv()
|
||||
# Define the configuration for the graph
|
||||
# ************************************************
|
||||
|
||||
openai_key = os.getenv("OPENAI_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -34,10 +34,12 @@ class Projects(BaseModel):
|
||||
|
||||
openai_key = os.getenv("OPENAI_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -24,9 +24,10 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"temperature": 0.7,
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"tts_model": {
|
||||
"api_key": openai_key,
|
||||
|
||||
@ -27,8 +27,10 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "ernie/ernie-bot-turbo",
|
||||
"ernie_client_id": "<ernie_client_id>",
|
||||
"ernie_client_secret": "<ernie_client_secret>",
|
||||
"temperature": 0.1
|
||||
},
|
||||
"verbose":False,
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
"max_depth": 1
|
||||
|
||||
@ -28,7 +28,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"library": "beautifulsoup",
|
||||
"verbose": True,
|
||||
|
||||
@ -18,7 +18,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"library": "beautifulsoup",
|
||||
"verbose": True,
|
||||
|
||||
@ -16,7 +16,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"max_results": 2,
|
||||
"verbose": True,
|
||||
|
||||
@ -31,7 +31,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"max_results": 2,
|
||||
"verbose": True,
|
||||
|
||||
@ -17,7 +17,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -16,7 +16,7 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("MISTRAL_API_KEY"),
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -18,7 +18,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -30,7 +30,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key":mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -29,7 +29,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key":mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -28,7 +28,7 @@ mistral_key = os.getenv("MISTRAL_API_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": mistral_key,
|
||||
"model": "mistral/open-mistral-nemo",
|
||||
"model": "mistralai/open-mistral-nemo",
|
||||
},
|
||||
"verbose":False,
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ graph_config = {
|
||||
# Define the graph nodes
|
||||
# ************************************************
|
||||
|
||||
llm_model = OpenAI(graph_config["llm"])
|
||||
llm_model = ChatOpenAI(graph_config["llm"])
|
||||
embedder = OpenAIEmbeddings(api_key=llm_model.openai_api_key)
|
||||
|
||||
# define the nodes for the graph
|
||||
|
||||
@ -18,7 +18,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"max_depth": 1
|
||||
|
||||
@ -13,7 +13,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": True,
|
||||
|
||||
@ -17,7 +17,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"max_results": 2,
|
||||
"max_images": 1,
|
||||
|
||||
@ -19,7 +19,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("OPENAI_API_KEY"),
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -18,7 +18,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"library": "beautifulsoup"
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"library": "beautifulsoup",
|
||||
"verbose": True,
|
||||
|
||||
@ -18,7 +18,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"library": "beautifulsoup",
|
||||
"verbose": True,
|
||||
|
||||
@ -16,7 +16,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"max_results": 2,
|
||||
"verbose": True,
|
||||
|
||||
@ -31,7 +31,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"max_results": 2,
|
||||
"verbose": True,
|
||||
|
||||
@ -17,7 +17,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -18,7 +18,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -18,7 +18,7 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("OPENAI_API_KEY"),
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -30,7 +30,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key":openai_key,
|
||||
"model": "gpt-4o-mini",
|
||||
"model": "openai/gpt-4o-mini",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -25,7 +25,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
"temperature": 0.7,
|
||||
},
|
||||
"tts_model": {
|
||||
|
||||
@ -29,7 +29,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key":openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -28,7 +28,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose":False,
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ graph_config = {
|
||||
# Define the node
|
||||
# ************************************************
|
||||
|
||||
llm_model = OpenAI(graph_config["llm"])
|
||||
llm_model = ChatOpenAI(graph_config["llm"])
|
||||
|
||||
robots_node = KnowledgeGraphNode(
|
||||
input="user_prompt & answer_dict",
|
||||
|
||||
@ -11,12 +11,12 @@ from scrapegraphai.nodes import RobotsNode
|
||||
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"model": "ollama/llama3",
|
||||
"model": "llama3",
|
||||
"temperature": 0,
|
||||
"streaming": True
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"model": "nomic-embed-text",
|
||||
"temperature": 0,
|
||||
# "base_url": "http://localhost:11434", # set ollama URL arbitrarily
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
Example of custom graph using existing nodes
|
||||
"""
|
||||
|
||||
from scrapegraphai.models import Ollama
|
||||
from langchain_community.chat_models import ChatOllama
|
||||
from scrapegraphai.nodes import SearchInternetNode
|
||||
|
||||
# ************************************************
|
||||
@ -24,7 +24,7 @@ graph_config = {
|
||||
# Define the node
|
||||
# ************************************************
|
||||
|
||||
llm_model = Ollama(graph_config["llm"])
|
||||
llm_model = ChatOllama(graph_config["llm"])
|
||||
|
||||
search_node = SearchInternetNode(
|
||||
input="user_input",
|
||||
|
||||
@ -51,7 +51,7 @@ models_tokens = {
|
||||
"gemini-1.5-pro-latest": 128000,
|
||||
"models/embedding-001": 2048
|
||||
},
|
||||
"google_vertexai": {
|
||||
"google_vertexai": {
|
||||
"gemini-1.5-flash": 128000,
|
||||
"gemini-1.5-pro": 128000,
|
||||
"gemini-1.0-pro": 128000,
|
||||
@ -137,6 +137,7 @@ models_tokens = {
|
||||
"claude-3-sonnet-20240229": 200000,
|
||||
"claude-3-haiku-20240307": 200000,
|
||||
"claude-3-5-sonnet-20240620": 200000,
|
||||
"claude-3-haiku-20240307": 4000,
|
||||
},
|
||||
"bedrock": {
|
||||
"anthropic.claude-3-5-sonnet-20240620": 200000,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user