From 864fe926698c06694d1cd1548fe7e480abdc545f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Tue, 14 Jan 2025 11:13:34 +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=EF=BC=8C=E5=88=87=E6=8D=A2=E8=87=B3=20ollama/qwen2:7b?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E8=B0=83=E6=95=B4=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-ollama.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app-ollama.py b/app-ollama.py index d06c7ce..fe8d14f 100644 --- a/app-ollama.py +++ b/app-ollama.py @@ -3,13 +3,19 @@ from scrapegraphai.graphs import SmartScraperGraph graph_config = { "llm": { # "model": "ollama/mistral-nemo:latest", - "model": "ollama/mistral:latest", + # "model": "ollama/mistral:latest", + + # "model": "ollama/llama3.2:latest", + # "model_tokens": 131072, # ollama show llama3.2:latest + + "model": "ollama/qwen2:7b", + "model_tokens": 32768, # ollama show qwen2:7b + "temperature": 0, # 更准确执行任务 "format": "json", # Ollama 需要显式指定格式 }, "embeddings": { "model": "ollama/nomic-embed-text", - }, "verbose": True, # "headless": False, @@ -17,8 +23,8 @@ graph_config = { # 抓取网页标题 smart_scraper_graph = SmartScraperGraph( - prompt="List all article titles on the page", - # prompt="列出页面上的所有文章标题", + # prompt="List all article titles on the page", + prompt="列出页面上的所有文章标题", source="https://www.aivi.fyi/", config=graph_config )