강의

멘토링

커뮤니티

Inflearn コミュニティ Q&A

kangjun205 のプロフィール画像
kangjun205

投稿した質問数

皆のための大規模言語モデル LLM Part 5 - LangGraphで私だけのAIエージェント作り

# Plan-and-Executeアーキテクチャの実装

"Plan-and-Execute 아키텍쳐 구현하기" 강의 prompt not found error

作成

·

173

0

  • "Plan-and-Execute 아키텍쳐 구현하기" 강의 hub.pull("ih/ih-react-agent-executor") 실행 시 not found error 발생

  • hub.pull("pollyjaky/ih-react-agent-executor") 로 대체

llmlangchainragopenai-apiai-agentlanggraph

回答 1

0

AISchool님의 프로필 이미지
AISchool
インストラクター

안녕하세요~. 반갑습니다.

먼저 수강에 불편을 드려서 죄송하고 정보 공유 감사합니다~.

 

강의 촬영시점 이후로 시간이 흘러서 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

 

좋은 하루되세요.

감사합니다.

kangjun205 のプロフィール画像
kangjun205

投稿した質問数

質問する