From 653bd96d35da4d2e7c5124b1ff8814c593c1b4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Tue, 14 Jan 2025 14:06:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A8=A1=E5=9E=8B=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-ollama.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/app-ollama.py b/app-ollama.py index fe8d14f..164fc42 100644 --- a/app-ollama.py +++ b/app-ollama.py @@ -2,14 +2,17 @@ from scrapegraphai.graphs import SmartScraperGraph graph_config = { "llm": { - # "model": "ollama/mistral-nemo:latest", - # "model": "ollama/mistral:latest", + "model": "ollama/mistral-nemo:12b", + "model_tokens": 1024000, - # "model": "ollama/llama3.2:latest", + # "model": "ollama/mistral:7b", + # "model_tokens": 32768, + + # "model": "ollama/llama3.2:3b", # "model_tokens": 131072, # ollama show llama3.2:latest - "model": "ollama/qwen2:7b", - "model_tokens": 32768, # ollama show qwen2:7b + # "model": "ollama/qwen2:7b", + # "model_tokens": 32768, # ollama show qwen2:7b "temperature": 0, # 更准确执行任务 "format": "json", # Ollama 需要显式指定格式 @@ -21,11 +24,16 @@ graph_config = { # "headless": False, } -# 抓取网页标题 +# smart_scraper_graph = SmartScraperGraph( +# # prompt="List all article titles on the page", +# prompt="列出页面上的所有文章标题", +# source="https://www.aivi.fyi/", +# config=graph_config +# ) + smart_scraper_graph = SmartScraperGraph( - # prompt="List all article titles on the page", - prompt="列出页面上的所有文章标题", - source="https://www.aivi.fyi/", + prompt="List all Stations on the page. the data is in tbody", + source="https://network.satnogs.org/stations/", config=graph_config )