Comments on: ReAct (Reason+Act) prompting in LLMs/2023/03/07/react-with-openai-gpt-and-langchain/Professional Development, Data ScienceThu, 07 Nov 2024 00:26:55 +0000hourly1http://wordpress.com/By: 使用思维链和工具结合得到人工智能代理 – AIXsns/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42521Fri, 24 Nov 2023 09:56:45 +0000/?p=16106#comment-42521[…] www.digital-kranti.com/2023/03/07/… […]

Like

]]>
By: RAG (Retrieval Augmented Generation) のさまざまな手法 | @Subaru/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42520Thu, 09 Nov 2023 07:27:33 +0000/?p=16106#comment-42520[…] ReAct をご存じない方は、是非 こちらを参照してください。) STP だけでなく、Multi-Hop 検索や、複数 DB […]

Like

]]>
By: Jegan/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42518Mon, 25 Sep 2023 16:26:34 +0000/?p=16106#comment-42518In reply to Tsuyoshi Matsuzaki.

Thank you very much!!

Like

]]>
By: Tsuyoshi Matsuzaki/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42517Mon, 25 Sep 2023 02:46:19 +0000/?p=16106#comment-42517In reply to Tsuyoshi Matsuzaki.

I have updated source code from LangChain 0.0.100 to 0.0.300 (current).

Like

]]>
By: Tsuyoshi Matsuzaki/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42453Thu, 14 Sep 2023 00:40:36 +0000/?p=16106#comment-42453In reply to Jegan.

Thank you for your feedback.
I’m sorry, but this source code runs on langchain library version 0.0.100 (old version) and you might have run this program on recent version.
In current langchain version (today, 0.0.288), instead of implementing _extract_tool_and_input() method, you should divide this implementation into parser class and should instantiate this parser class in _get_default_output_parser() method.
See ReActDocstoreAgent in [langchain package dir]/agents/react/base.py (which is the implementation of above react-docstore agent) and ReActOutputParser in [langchain package dir]/agents/react/output_parser.py (which is the implementation of its parser class).

Like

]]>
By: Jegan/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42449Wed, 13 Sep 2023 16:52:43 +0000/?p=16106#comment-42449This is a great article. Thanks.

However, when I try to run the script, I get struck in the agent creation step

—————————————————————————
TypeError Traceback (most recent call last)
Cell In[11], line 4
1 ##########
2 # run agent
3 ##########
—-> 4 agent = ReActTestAgent.from_llm_and_tools(
5 llm,
6 tools
7 )

File …/lib/python3.9/site-packages/langchain/agents/agent.py:559, in Agent.from_llm_and_tools(cls, llm, tools, callback_manager, output_parser, **kwargs)
557 tool_names = [tool.name for tool in tools]
558 _output_parser = output_parser or cls._get_default_output_parser()
–> 559 return cls(
560 llm_chain=llm_chain,
561 allowed_tools=tool_names,
562 output_parser=_output_parser,
563 **kwargs,
564 )

TypeError: Can’t instantiate abstract class ReActTestAgent with abstract method _get_default_output_parser

Do we have to specifically define the output parser? Any thoughts on this?

Like

]]>
By: LLM: Chain of Thought (CoT) and ReAct – gps2nowhere/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42400Sat, 09 Sep 2023 20:05:04 +0000/?p=16106#comment-42400[…] Example code […]

Like

]]>
By: LangChain – Modules | 뉴테크프라임/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42275Tue, 22 Aug 2023 08:36:13 +0000/?p=16106#comment-42275[…] 잘 한 번 읽어볼 글입니다. 글 내용 자체도 읽어볼 가치는 충분합니다. /2023/03/07/react-with-openai-gpt-and-langchain/?fbclid=IwAR35qG4EtSE7b7…https://github.com/samwit/langchain-tutorials https://github.com/samwit/llm-tutorials[…]

Like

]]>
By: 解密Prompt系列12. LLM Agent零微调范式 ReAct & Self Ask | 呱唧呱唧网/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42190Sun, 30 Jul 2023 00:11:17 +0000/?p=16106#comment-42190[…] /2023/03/07/react-with-openai-gpt-and-langchain/ […]

Like

]]>
By: LangChain – 페이스북 커뮤니티 활동 내용 | 뉴테크프라임/2023/03/07/react-with-openai-gpt-and-langchain/comment-page-1/#comment-42175Tue, 25 Jul 2023 09:11:30 +0000/?p=16106#comment-42175[…] 잘 한 번 읽어볼 글입니다. 글 내용 자체도 읽어볼 가치는 충분합니다. /2023/03/07/react-with-openai-gpt-and-langchain/?fbclid=IwAR35qG4EtSE7b7…https://github.com/samwit/langchain-tutorials https://github.com/samwit/llm-tutorials[…]

Like

]]>