add agent
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
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")
|
||||||
Reference in New Issue
Block a user