docs: Update concepts.mdx (#26496)

- Fix comments in Python
- Fix repeated sentences
This commit is contained in:
Yoshitaka Fujii 2024-09-16 10:46:15 +09:00 committed by GitHub
parent 9f5960a0aa
commit bd42344b0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -595,10 +595,10 @@ tool_call = ai_msg.tool_calls[0]
# -> ToolCall(args={...}, id=..., ...)
tool_message = tool.invoke(tool_call)
# -> ToolMessage(
content="tool result foobar...",
tool_call_id=...,
name="tool_name"
)
# content="tool result foobar...",
# tool_call_id=...,
# name="tool_name"
# )
```
If you are invoking the tool this way and want to include an [artifact](/docs/concepts/#toolmessage) for the ToolMessage, you will need to have the tool return two things.
@ -717,8 +717,6 @@ During run-time LangChain configures an appropriate callback manager (e.g., [Cal
The `callbacks` property is available on most objects throughout the API (Models, Tools, Agents, etc.) in two different places:
The callbacks are available on most objects throughout the API (Models, Tools, Agents, etc.) in two different places:
- **Request time callbacks**: Passed at the time of the request in addition to the input data.
Available on all standard `Runnable` objects. These callbacks are INHERITED by all children
of the object they are defined on. For example, `chain.invoke({"number": 25}, {"callbacks": [handler]})`.