Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langchain agent #96

Closed
Dave86ch opened this issue Jun 19, 2023 · 2 comments
Closed

Langchain agent #96

Dave86ch opened this issue Jun 19, 2023 · 2 comments

Comments

@Dave86ch
Copy link

Dave86ch commented Jun 19, 2023

Hello. I am trying to integrate Zep into my AI agent, but I have encountered a problem. Given my lack of experience, I am struggling to resolve it, and I trust in your patience to help me through this.

Each time I start my agent, Docker throws me an error. Here it is:

2023-06-19 14:02:00 time="2023-06-19T12:02:00Z" level=info msg="http://localhost:8080/api/v1/sessions/193bff5b-4ebe-4915-b9bb-362cf2933906/memory" bytes=10 category=router duration=95580370 duration_display=95.581852ms method=GET proto=HTTP/1.1 remote_ip=172.18.0.1 status_code=404 2023-06-19 14:02:19 time="2023-06-19T12:02:19Z" level=info msg="http://localhost:8080/api/v1/sessions/193bff5b-4ebe-4915-b9bb-362cf2933906/memory" bytes=2 category=router duration=65056443 duration_display=65.057435ms method=POST proto=HTTP/1.1 remote_ip=172.18.0.1 status_code=200 2023-06-19 14:02:19 time="2023-06-19T12:02:19Z" level=info msg="http://localhost:8080/api/v1/sessions/193bff5b-4ebe-4915-b9bb-362cf2933906/memory" bytes=2 category=router duration=25285558 duration_display=25.28644ms method=POST proto=HTTP/1.1 remote_ip=172.18.0.1 status_code=200 2023-06-19 14:02:20 time="2023-06-19T12:02:20Z" level=error msg="ROLLBACK[1.892µs]: ROLLBACK: sql: transaction has already been committed or rolled back" 2023-06-19 14:02:21 time="2023-06-19T12:02:21Z" level=error msg="ROLLBACK[1.632µs]: ROLLBACK: sql: transaction has already been committed or rolled back"

and this is the memory function from the client side

`
def memory():

session_id = str(uuid.uuid4())  # This is a unique identifier for the user
load_dotenv()
True
# Set up Zep Chat History
zep_chat_history = ZepChatMessageHistory(
    session_id=session_id,
    url="http://localhost:8080",
)

template = """example.

{chat_history}
Human: {human_input}
Chatbot:"""

prompt = PromptTemplate(
    input_variables=["chat_history", "human_input"], 
    template=template
)
memory = ConversationBufferMemory(memory_key="chat_history", chat_memory = zep_chat_history)
# history = ChatMessageHistory()
# memory.chat_memory.add_ai_message("example")



return memory

`

@danielchalef
Copy link
Member

@Dave86ch The ROLLBACK error can be ignored. We've resolved this in the latest version of Zep, which incorporates #94 . Can you confirm you no longer see this once upgrading to v0.6.6?

@Dave86ch
Copy link
Author

@Dave86ch The ROLLBACK error can be ignored. We've resolved this in the latest version of Zep, which incorporates #94 . Can you confirm you no longer see this once upgrading to v0.6.6?

it works, thank you so much for your great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants