Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

syshin0116
Copy link
Contributor

@syshin0116 syshin0116 commented Jan 8, 2025

초안(01.08)

Table of Contents 1안,2안 내용:

  • 1안(현재): LangGraph를 사용한 간단한 예시
  • 2안(고려중인 다음주 개선 방향): 메모리 관련한 여러가지 설명을 추가할지, cookbook답게 use case를 더 추가할지 고민입니다

추가(01.12)

  • 코드 리팩토링
  • 주석 추가
  • 소제목 변경, Overview등 마크다운 설명 추가

추가(01.15)

  • LangGraph 사용 이유 및 장점 간략히 설명

추가(01.18)

  • 아래 Block이 빠져있어서 추가
You can alternatively set API keys such as `OPENAI_API_KEY` in a `.env` file and load them.

[Note] This is not necessary if you've already set the required API keys in previous steps.
image

추가(01.19)

상단 Google Colab, Github 뱃지 링크 수정


[Note]

  • use case 추가하고 싶었는데, 생각보다 스케일이 너무 커서 실패했습니다.
  • notebook 환경보다는 아에 git repo를 파야 의미있는 use case가 나올것 같아서 다음 기회에 개인적으로 진행해보려 합니다.

Author Checklist

  • PR Title Format: I have confirmed that the PR title follows the correct format. (e.g., [N-2] 07-Text Splitter / 07-RecursiveCharacterTextSplitter)

  • Committed Files: I have ensured that no unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) are included. These files are not allowed.

  • (Optional) Related Issue: If this PR is linked to an issue, I have referenced the issue number in the PR message. (e.g., Fixes Update 01-PromptTemplate.ipynb #123)

  • ❌ Do not include unnecessary files (e.g., .bin, .gitignore, poetry.lock, pyproject.toml) or other people's code. If included, close the PR and create a new PR.

Review Template (Intial PR)

🖥️ OS: Win/Mac/Linux   
✅ Checklist      
 - [ ] **Template**: Tutorials follows the required template. 
 - [ ] **Table of Contents(TOC) Links**: All Table of Contents links work. ((Yes/No)
 - [ ] **Image**: Image filenames follow guidelines.
 - [ ] **Imports*: All import statements use the latest versions. Ensure "langchain-teddynote" is not used. 
 - [ ] **Code Execution**: Code runs without errors.
 - Comments: {Write freely, 한국어 기술 가능}     

If no one reviews your PR within a few days, please @-mention one of teddylee777, musangk, BAEM1N

YellowGangneng
YellowGangneng previously approved these changes Jan 10, 2025
Copy link
Contributor

@YellowGangneng YellowGangneng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

너무나도 깔끔한 튜토리얼이네요... 저도 승엽님 코드를 스승삼아(?) 더 나은 튜토리얼을 작성해봐야겠습니다!
Long term memory 부분도 기대하겠습니다!
고생하셨고, 조금 더 파이팅입니다!!

"\n",
"## Table of Contents\n",
"\n",
"TODO: 1안, 2안 결정 + ### 제거\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2안은 좀 더 뭔가 교과서적인 느낌이 든다면, 1안은 A-Z까지 흐름을 타면서 알려주는 느낌이 들 것 같네요
뭔가 1안이 Langchain-opentutorial 컨셉이랑 비슷한 느낌이 드네요!

"\n",
"This guide focuses on managing **Short-term** and **Long-term Memory** for conversational AI, specifically for building personalized chatbots. We will explore two implementation paths:\n",
"\n",
"1. **Using LangGraph**: A structured and feature-rich framework for managing AI memory.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

랭그래프를 사용하고, 사용하지 않고 이 두 가지의 구현체를 구현하시려는 저의가 뭔지 궁금합니당 ㅎㅎ
개인적으로는 한 가지 케이스만 있어도 되지 않나..?라는 생각이 들어서요!

"source": [
"## Database Configuration\n",
"\n",
"In this section, we will set up an **SQLite database** to store Short-term and Long-term Memory information for our chatbot. SQLite is a lightweight, serverless database that is easy to set up and ideal for prototyping or small-scale applications.\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

간단하게나마 DB 선정 이유 있는 거 좋네요ㅎㅎ

@dancing-with-coffee
Copy link
Contributor

받아서 돌려보고나서 느낀 점을 바로 적습니다!
편하게 챙기실 부분만 찾아서 해주시면 좋을 것 같아요 :)

1. Overview

  • ConversationMemory를 관리할 수 있다는걸 처음 알았는데, 대화의 맥락을 얼마나 기억해서 사용할지에 따라 Short-term과 Long-term 메모리가 따로 있다는걸 알게된 점이 좋았습니다.
  • 현재 Short-term memory까지 만들어져 있는데, 추후에 Long-term memory가 추가될 때는 각각의 장점을 잘 볼 수 있는 prompt가 쓰이면 차이점을 확연히 알게되어 좋을 것 같습니다.
  • 제가 가능한지 아예 몰라서, 그냥 아이디어처럼 적어두는건데 이 memory이 기능으로 실제 LLM이 사용해야할 in-memory 사용량의 변화를 확인할 수 있으면 제일 좋을 것 같습니다! (Long-term memory는 메모리를 많이 사용할 것 같다는 느낌도 들고해서요)

2. Markdown

  • 다음주에 아마 모든게 추가될 것 같지만, 각 Heading 2별로 자세하게 어떤 내용인지 알고 싶습니다! 전혀 모르는 내용이다보니 LangGraph를 왜 사용하는지 어떤 기능을 구현하려고 했는지가 잘 안보일 것 같아서요!

syshin0116 and others added 3 commits January 12, 2025 15:55
@syshin0116
Copy link
Contributor Author

너무나도 깔끔한 튜토리얼이네요... 저도 승엽님 코드를 스승삼아(?) 더 나은 튜토리얼을 작성해봐야겠습니다! Long term memory 부분도 기대하겠습니다! 고생하셨고, 조금 더 파이팅입니다!!

주신 피드백 참고해서 1안을 발전시키기로 했습니다. 리뷰 감사 드립니다.ㅎㅎ

@syshin0116
Copy link
Contributor Author

받아서 돌려보고나서 느낀 점을 바로 적습니다! 편하게 챙기실 부분만 찾아서 해주시면 좋을 것 같아요 :)

1. Overview

  • ConversationMemory를 관리할 수 있다는걸 처음 알았는데, 대화의 맥락을 얼마나 기억해서 사용할지에 따라 Short-term과 Long-term 메모리가 따로 있다는걸 알게된 점이 좋았습니다.
  • 현재 Short-term memory까지 만들어져 있는데, 추후에 Long-term memory가 추가될 때는 각각의 장점을 잘 볼 수 있는 prompt가 쓰이면 차이점을 확연히 알게되어 좋을 것 같습니다.
  • 제가 가능한지 아예 몰라서, 그냥 아이디어처럼 적어두는건데 이 memory이 기능으로 실제 LLM이 사용해야할 in-memory 사용량의 변화를 확인할 수 있으면 제일 좋을 것 같습니다! (Long-term memory는 메모리를 많이 사용할 것 같다는 느낌도 들고해서요)

2. Markdown

  • 다음주에 아마 모든게 추가될 것 같지만, 각 Heading 2별로 자세하게 어떤 내용인지 알고 싶습니다! 전혀 모르는 내용이다보니 LangGraph를 왜 사용하는지 어떤 기능을 구현하려고 했는지가 잘 안보일 것 같아서요!

현재 있는 간략항 사용법에 추가로 Short-term과 Long-term 메모리 각각 관리하여 오는 이점을 보여줄 수 있는 Use case를 만들어볼까 합니다ㅎㅎ

오 In-memory 사용량 추적 제가 생각지 못했던 좋은 의견인것 같아요! 위에꺼를 우선저긍로 하되, 꼭 반영해보고 싶네요

리뷰 감사드립니다. 덕분에 좋은 아이디어들이 생긴것 같아요

@YellowGangneng
Copy link
Contributor

🖥️ OS: Win
✅ Checklist

  • Template: Tutorials follows the required template.
  • Table of Contents(TOC) Links: All Table of Contents links work. ((Yes/No)
  • Image: Image filenames follow guidelines.
  • *Imports: All import statements use the latest versions. Ensure "langchain-teddynote" is not used.
  • Code Execution: Code runs without errors.
  • Comments: 너무 잘 작동됩니다..! 설명하고 싶은 부분에 대한 강조도 잘 되어 있어서 어느 부분을 중점적으로 봐야 하는지도 명확하고.. 정말 튜토리얼의 정석같은 느낌이에요 👍 너무 재밌게 잘 봤고, 많이 배웠습니다!!! 고퀄리티의 튜토리얼 감사드립니다 🙇‍♂️ 고생하셨습니다!

YellowGangneng
YellowGangneng previously approved these changes Jan 16, 2025
Copy link
Contributor

@YellowGangneng YellowGangneng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!!!

Copy link
Contributor

@dancing-with-coffee dancing-with-coffee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Template (Intial PR)

🖥️ OS: Win/Mac/Linux   
✅ Checklist      
 - [v] **Template**: Tutorials follows the required template. 
 - [ ] **Table of Contents(TOC) Links**: All Table of Contents links work. ((Yes/**No**)
 - [v] **Image**: Image filenames follow guidelines.
 - [v] **Imports*: All import statements use the latest versions. Ensure "langchain-teddynote" is not used. 
 - [v] **Code Execution**: Code runs without errors.
 - Comments: {Write freely, 한국어 기술 가능}     

저번보다 설명도 훨씬 많아지고, 예제도 풍부해져서 이해하는데 많은 도움이 되었습니다!
돌리면서 확인해본 결과 모든 코드 다 잘 작동하고, 오타도 없었습니다. 꼼꼼하게 작성해주셔서 리뷰할게 별로 없네요ㅎㅎ 고생 많으셨습니다!

  • Table of Contents 링크가 제 VSCode에서는 작동하지 않네요.. 이것만 한번 체크 부탁드려요!

" - `LangGraph` v0.2 offers separate checkpointer libraries (e.g., `MemorySaver`, `SqliteSaver`, `PostgresSaver`)\n",
" - Easily build or adapt custom solutions for specific databases or workflows\n",
"\n",
"## Table of Contents\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저만 안되는건지 모르겠는데... Table of Contents가 작동하지 않습니다! 문법은 다 맞는것 같은데, 왜 안되는지 모르겠네요ㅠㅠ 제 VSCode가 오류라면 넘어가셔도 좋습니다! 체크겸 한번 남겨요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인해보니 정상 작동합니다!

저도 이번에 처음 알게된 사실인데, 아마 ipynb checkpoint가 남아있으셔서 그런것 같아요ㅎㅎ없애주거나, 다른 경로로 파일 다운로드 받아서 정상작동 확인 가능합니다ㅎㅎ

@syshin0116
Copy link
Contributor Author

@dancing-with-coffee @YellowGangneng

수정사항이 있어 재 approve 부탁드립니다! 코드는 동일하고, 아래 markdown cell만 하나 추가했습니다


수정사항(01.18)

  • 아래 Block이 빠져있어서 추가
You can alternatively set API keys such as `OPENAI_API_KEY` in a `.env` file and load them.

[Note] This is not necessary if you've already set the required API keys in previous steps.
image

Copy link
Contributor

@dancing-with-coffee dancing-with-coffee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정사항 모두 확인했습니다! 말씀해주신대로 하니 table of contents도 잘 동작하네요ㅎㅎ 다행입니다!! 2주간 고생 많으셨습니다!
덕분에 많이 배웠어요 :)

YellowGangneng
YellowGangneng previously approved these changes Jan 19, 2025
Copy link
Contributor

@YellowGangneng YellowGangneng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생 많으셨습니다!! 정말 너무 튜토리얼이에요. 앞으로 많은 참고가 될 것 같습니다 :) 감사합니다!

Copy link
Contributor

@YellowGangneng YellowGangneng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅠㅠㅠ리뷰할 때 좀 더 꼼꼼히 해서 해당 부분도 미리 언급을 드렸으면 좋았을텐데 죄송합니다.ㅠㅠ 고생하셨습니다!!!

Copy link
Contributor

@dancing-with-coffee dancing-with-coffee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전에 다 확인했어서 빠르게 Approve합니다!

@teddylee777 teddylee777 merged commit ea5e1d0 into LangChain-OpenTutorial:main Jan 23, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants