9 lines
315 B
Python
9 lines
315 B
Python
from langchain.agents import initialize_agent, AgentType
|
|
from langchain.llms.ollama import Ollama
|
|
from tools import search_local_kb, web_search
|
|
|
|
llm = Ollama(model="llama3")
|
|
|
|
tools=[search_local_kb,web_search]
|
|
agent=initialize_agent(tools,llm,agent_type=AgentType.OPENAI_FUNCTIONS,verbose=True)
|
|
print("Agent ready") |