Class | Package | Local | Serializable | JS support | Package downloads | Package latest |
---|---|---|---|---|---|---|
ChatWriter | langchain-writer | ❌ | ❌ | ❌ |
Tool calling | Structured output | JSON mode | Image input | Audio input | Video input | Token-level streaming | Native async | Token usage | Logprobs |
---|---|---|---|---|---|---|---|---|---|
✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ✅ | ✅ | ❌ |
ChatWriter
is available from the langchain-writer
package. Install it with:
invoke
method:
ChatWriter.bind_tools
, you can easily pass in Pydantic classes, dictionary schemas, LangChain tools, or even functions as tools to the model. Under the hood, these are converted to tool schemas, which look like this:
ChatWriter.bind_tools
:
ChatWriter.bind_tools()
method does not create a new instance with bound tools, but stores the received tools
and tool_choice
in the initial class instance attributes to pass them as parameters during the Palmyra LLM call while using ChatWriter
invocation. This approach allows the support of different tool types, e.g. function
and graph
. Graph
is one of the remotely called Writer Palmyra tools. For further information, visit our docs.
For more information about tool usage in LangChain, visit the LangChain tool calling documentation.
max_concurrency
:
ChatWriter
with a prompt template like so: