mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 19:47:13 +00:00
templates: Add neo4j semantic layer with ollama template (#17192)
A template with JSON-based agent using Mixtral via Ollama. --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
17
templates/neo4j-semantic-ollama/main.py
Normal file
17
templates/neo4j-semantic-ollama/main.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from neo4j_semantic_ollama import agent_executor
|
||||
|
||||
if __name__ == "__main__":
|
||||
original_query = "What do you know about person John?"
|
||||
followup_query = "John Travolta"
|
||||
chat_history = [
|
||||
(
|
||||
"What do you know about person John?",
|
||||
"I found multiple people named John. Could you please specify "
|
||||
"which one you are interested in? Here are some options:"
|
||||
"\n\n1. John Travolta\n2. John McDonough",
|
||||
)
|
||||
]
|
||||
print(agent_executor.invoke({"input": original_query}))
|
||||
print(
|
||||
agent_executor.invoke({"input": followup_query, "chat_history": chat_history})
|
||||
)
|
Reference in New Issue
Block a user