Spaces:
Sleeping
Sleeping
Priyansh Saxena commited on
Commit ·
cb48d61
1
Parent(s): cddce69
UPGRADE: Use langchain-ollama package with OllamaLLM (removes Ollama deprecation warning)
Browse files- requirements.txt +1 -0
- src/agent/research_agent.py +2 -2
requirements.txt
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
langchain
|
| 2 |
langchain-google-genai
|
| 3 |
langchain-community
|
|
|
|
| 4 |
aiohttp
|
| 5 |
tenacity
|
| 6 |
pydantic
|
|
|
|
| 1 |
langchain
|
| 2 |
langchain-google-genai
|
| 3 |
langchain-community
|
| 4 |
+
langchain-ollama
|
| 5 |
aiohttp
|
| 6 |
tenacity
|
| 7 |
pydantic
|
src/agent/research_agent.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 2 |
-
from
|
| 3 |
from langchain_classic.memory import ConversationBufferWindowMemory
|
| 4 |
from typing import List, Dict, Any
|
| 5 |
import asyncio
|
|
@@ -54,7 +54,7 @@ class Web3ResearchAgent:
|
|
| 54 |
def _init_ollama(self):
|
| 55 |
"""Initialize Ollama LLM with optimized settings"""
|
| 56 |
try:
|
| 57 |
-
self.fallback_llm =
|
| 58 |
model=config.OLLAMA_MODEL,
|
| 59 |
base_url=config.OLLAMA_BASE_URL,
|
| 60 |
temperature=0.1
|
|
|
|
| 1 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
| 2 |
+
from langchain_ollama import OllamaLLM
|
| 3 |
from langchain_classic.memory import ConversationBufferWindowMemory
|
| 4 |
from typing import List, Dict, Any
|
| 5 |
import asyncio
|
|
|
|
| 54 |
def _init_ollama(self):
|
| 55 |
"""Initialize Ollama LLM with optimized settings"""
|
| 56 |
try:
|
| 57 |
+
self.fallback_llm = OllamaLLM(
|
| 58 |
model=config.OLLAMA_MODEL,
|
| 59 |
base_url=config.OLLAMA_BASE_URL,
|
| 60 |
temperature=0.1
|