[Week2] StateGraph를 활용한 클래식 공연 예습 State Memory 구현 과제#15
Open
daexvk wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경점 👍
InMemorySavercheckpointer를compile()에 연결해 thread별 상태 저장을 적용했습니다.thread_id로 이어지는 대화와 다른thread_id로 새로 시작되는 대화를 노트북 결과에 포함했습니다.interrupt_before=["tools"]를 적용했습니다.week2_mission.ipynb에 정리했습니다.버그 해결 💊
PrepAnswer가 checkpointer에 직접 저장되며 생길 수 있는 직렬화/파싱 문제를 줄이기 위해 최종 답변 상태를 dict 형태로 저장하도록 변경했습니다.테스트 💻
python -m py_compile graph.py tools.py schema.pypython -m json.tool week2_mission.ipynb같은 thread 테스트:
classical-week2-same말러 교향곡 5번 공연 전에 예습하고 싶어. 처음 듣는 사람 기준으로 알려줘.같은 thread, 두번째 질문: 그럼 4악장 아다지에토만 먼저 들을 때 어디에 집중하면 돼?말러 교향곡 5번 4악장 아다지에토중심으로 답변했습니다.91626다른 thread 테스트:
classical-week2-new다른 thread, 같은 질문: 그럼 4악장 아다지에토만 먼저 들을 때 어디에 집중하면 돼?51585get_state_history()결과:snapshots=8,latest_messages=9,latest_message_length=1626snapshots=5,latest_messages=5,latest_message_length=1585interrupt 테스트:
graph_with_interrupt = builder.compile(checkpointer=interrupt_memory, interrupt_before=["tools"])extract_poster_image_text도구 실행 전 중단되는 것을 확인했습니다.