From ecaca9fee17e67c87ce39011d8d4fb0014d9e23a Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Wed, 5 Nov 2025 16:46:07 +0800 Subject: [PATCH] Update langchain_example_with_Ollama.py --- 2025.11.02_langchain/langchain_example_with_Ollama.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/2025.11.02_langchain/langchain_example_with_Ollama.py b/2025.11.02_langchain/langchain_example_with_Ollama.py index 06832dc..f0c2332 100644 --- a/2025.11.02_langchain/langchain_example_with_Ollama.py +++ b/2025.11.02_langchain/langchain_example_with_Ollama.py @@ -5,10 +5,6 @@ The newest version of this code is on the web page: https://www.guanjihuan.com/a from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate -import dotenv - -# 加载环境变量(包含API密钥) -dotenv.load_dotenv() # 创建聊天模型 - 修改为调用 Ollama llm = ChatOpenAI(