작성
·
55
답변 1
0
안녕하세요~. 반갑습니다.
먼저 수강에 불편을 드려서 죄송하고 정보 공유 감사합니다~.
강의 촬영시점 이후로 시간이 흘러서 hub repo의 변화로 인해 에러가 발생한 것 같습니다.
말씀해주신대로 hub.pull("pollyjaky/ih-react-agent-executor")로 변경해서 사용하셔도 되고, 아니면 아래와 같이 간단하게 그냥 직접 프롬프트를 설정해주어도 됩니다.
from langchain import hub
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent
# Get the prompt to use - you can modify this!
prompt = "You are a helpful assistant."
# Choose the LLM that will drive the agent
llm = ChatOpenAI(model="gpt-4o")
agent_executor = create_react_agent(llm, tools, state_modifier=prompt)
다른 분들도 참고하실 수 있도록 위와 같이 수정된 colab 링크를 아래에 첨부합니다.
https://colab.research.google.com/drive/1EKu16O8r_9PQkg3TaaglQWiQxmI8gHEa?usp=sharing
좋은 하루되세요.
감사합니다.