You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a very descriptive title to this question.
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
Commit to Help
I commit to help with one of those options 👆
Example Code
python@tool(response_format='content_and_artifact')defget_weather_info(city:str):
""" search the weather info of the target city - city:target city """return (f"done!the weather info of {city} is: \n xxxxxxxx。",["test11111"])
agent=create_tool_calling_agent(
tools=[get_weather_info],
llm=llm,
prompt=prompt,
)
agent_executor=AgentExecutor(agent=agent, tools=[get_weather_info],return_intermediate_steps=True)
response=agent_executor.invoke(input={"input": "pls check the weather info of Shanghai"})
### Description
when I use content_and_artifact to create a tool and the initialize an egent with create_tool_calling_agent, I could not get the artifact result of tool response from the final output. Is there some methods to handle this problem?
### System Info
System Information
------------------
> OS: Linux
> OS Version: #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 11 15:25:05 UTC 2
> Python Version: 3.10.0 (default, Mar 3 2022, 09:58:08) [GCC 7.5.0]
Package Information
-------------------
> langchain_core: 0.3.34
> langchain: 0.3.18
> langchain_community: 0.3.17
> langsmith: 0.2.11
> langchain_deepseek: 0.1.1
> langchain_ollama: 0.2.2
> langchain_openai: 0.3.3
> langchain_text_splitters: 0.3.6
Optional packages not installed
-------------------------------
> langserve
Other Dependencies
------------------
> aiohttp<4.0.0,>=3.8.3: Installed. No version info available.
> async-timeout<5.0.0,>=4.0.0;: Installed. No version info available.
> dataclasses-json<0.7,>=0.5.7: Installed. No version info available.
> httpx: 0.27.0
> httpx-sse<1.0.0,>=0.4.0: Installed. No version info available.
> jsonpatch<2.0,>=1.33: Installed. No version info available.
> langchain-anthropic;: Installed. No version info available.
> langchain-aws;: Installed. No version info available.
> langchain-cohere;: Installed. No version info available.
> langchain-community;: Installed. No version info available.
> langchain-core<1.0.0,>=0.3.34: Installed. No version info available.
> langchain-deepseek;: Installed. No version info available.
> langchain-fireworks;: Installed. No version info available.
> langchain-google-genai;: Installed. No version info available.
> langchain-google-vertexai;: Installed. No version info available.
> langchain-groq;: Installed. No version info available.
> langchain-huggingface;: Installed. No version info available.
> langchain-mistralai;: Installed. No version info available.
> langchain-ollama;: Installed. No version info available.
> langchain-openai;: Installed. No version info available.
> langchain-text-splitters<1.0.0,>=0.3.6: Installed. No version info available.
> langchain-together;: Installed. No version info available.
> langchain<1.0.0,>=0.3.18: Installed. No version info available.
> langsmith-pyo3: Installed. No version info available.
> langsmith<0.4,>=0.1.125: Installed. No version info available.
> langsmith<0.4,>=0.1.17: Installed. No version info available.
> numpy<2,>=1.26.4;: Installed. No version info available.
> numpy<3,>=1.26.2;: Installed. No version info available.
> ollama: 0.4.6
> openai: 1.59.9
> orjson: 3.10.6
> packaging<25,>=23.2: Installed. No version info available.
> pydantic: 2.10.5
> pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available.
> pydantic<3.0.0,>=2.5.2;: Installed. No version info available.
> pydantic<3.0.0,>=2.7.4: Installed. No version info available.
> pydantic<3.0.0,>=2.7.4;: Installed. No version info available.
> PyYAML>=5.3: Installed. No version info available.
> requests: 2.32.3
> requests-toolbelt: 1.0.0
> requests<3,>=2: Installed. No version info available.
> SQLAlchemy<3,>=1.4: Installed. No version info available.
> tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available.
> tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
> tiktoken: 0.7.0
> typing-extensions>=4.7: Installed. No version info available.
> zstandard: Installed. No version info available.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked other resources
Commit to Help
Example Code
Beta Was this translation helpful? Give feedback.
All reactions