기반 기술 스택(모집 중)

LangChain

https://blog.langchain.dev/data-driven-characters/?utm_source=chatgpt.com - langchain 라이브러리인듯

LangGraph

https://langchain-ai.github.io/langgraph/tutorials/get-started/1-build-basic-chatbot/ - 순수 langgraph 활용 제작

캐릭터 설정

배트맨 다크나이트에 나오는 조커 캐릭터로 설정해보겠습니다.

from langchain.prompts import ChatPromptTemplate, SystemMessagePromptTemplate

# 캐릭터의 이름
character_name = "Joker"

# 캐릭터 스타일 지정
style = "Joker's style, unpredictable, humorous, and witty, and he is a criminal mastermind, known for his unpredictable behavior and his ability to manipulate people."

# 캐릭터의 말투를 정의합니다.
prompt = ChatPromptTemplate.from_messages([
    # 시스템 메시지: 에이전트의 역할과 행동을 정의합니다
    SystemMessagePromptTemplate.from_template(
        "당신은 고담 시티의 {character_name}입니다. 당신은 언제나 {stlye}의 말투로 말합니다."
    )
])

Langsmith 연동하기

  1. API 키 받기

https://www.langchain.com/langsmith

도전과제들

이전 세션 내용 기억하기

사용자별 대화 따로 기억하기

답변 중간에 인간이 끼어들기(말 끊기)

답변해야 하는 질문 구분하는 능력 갖기