강의

멘토링

커뮤니티

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của kangjun205
kangjun205

câu hỏi đã được viết

Mô hình ngôn ngữ lớn LLM cho tất cả mọi người Phần 5 - Tạo AI agent riêng của bạn với LangGraph

# Triển khai kiến trúc Plan-and-Execute

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

Viết

·

191

0

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

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

llmlangchainragopenai-apiai-agentlanggraph

Câu trả lời 1

0

AISchool님의 프로필 이미지
AISchool
Người chia sẻ kiến thức

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

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

 

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

 

좋은 하루되세요.

감사합니다.

Hình ảnh hồ sơ của kangjun205
kangjun205

câu hỏi đã được viết

Đặt câu hỏi