tmc / langchaingo

LangChain for Go, the easiest way to write LLM-based programs in Go
https://tmc.github.io/langchaingo/
MIT License
3.78k stars 523 forks source link

memory: Add Zep Cloud integration #746

Closed paul-paliychuk closed 3 weeks ago

paul-paliychuk commented 3 months ago

PR Checklist

Creates a zep package that aims to integrate with zep cloud memory, link to our docs. I set up zep.ChatMessageHistory and zep.Memory following your BufferMemory implementation. This can be used by users who want access to long term memory and provide good context to their llm prompts. After each message (or memory) is added to a session, we generate summaries and extract facts from the conversation. When we get memory, we inject the most relevant summary and conversation facts into a system prompt.

paul-paliychuk commented 3 months ago

@tmc Hi, Zep Engineer here. we currently support TS and Python LangChain integrations, and have recently released our go-sdk. Excited to deliver LangChain integration for our golang users too! Please let me know if you have any questions/suggestions about the implementation. Would love to hear how langchaingo users might prefer to use our memory.

For now I set up an example using ConversationChain, but we have a bunch more stuff we'd like to port to Go.

paul-paliychuk commented 3 months ago

Also I notice that the build examples is failing, this is due to /memory/zep import not being available yet.

devalexandre commented 3 months ago

Also I notice that the build examples is failing, this is due to /memory/zep import not being available yet.

for example don't need use go.mod , can import only package

paul-paliychuk commented 3 months ago

@devalexandre Hi, removed go.mod from example project, also upgraded zep sdk version with more straightforward initialization.

devalexandre commented 2 months ago

@tmc could review it?

devalexandre commented 1 month ago

@paul-paliychuk why update to draft?

tmc commented 3 weeks ago

@paul-paliychuk LMK when this is ready for review (or is itnow?)

paul-paliychuk commented 3 weeks ago

@tmc apologies, we were refactoring our go sdk api recently, will update PR components soon and mark as ready to review. Thanks!

paul-paliychuk commented 3 weeks ago

@tmc @devalexandre Ready for review

tmc commented 3 weeks ago

Sorry about the delay here, this looks great! A small comment but I think this can go in as-is and be fixed separately.

paul-paliychuk commented 3 weeks ago

@tmc Appreciate the review, will open a docs PR this week