diff --git a/docs/docs/agents/context.md b/docs/docs/agents/context.md index 942e7d628..b409b1524 100644 --- a/docs/docs/agents/context.md +++ b/docs/docs/agents/context.md @@ -33,7 +33,7 @@ LangGraph provides three ways to manage context, which combines the mutability a **Static runtime context** represents immutable data like user metadata, tools, and database connections that are passed to an application at the start of a run via the `context` argument to `invoke`/`stream`. This data does not change during execution. -!!! version-added "New in LangGraph v0.6: `context` replaces `config['configurable']`" +!!! version-added "Added in version 0.6.0: `context` replaces `config['configurable']`" Runtime context is now passed to the `context` argument of `invoke`/`stream`, which replaces the previous pattern of passing application configuration to `config['configurable']`. diff --git a/docs/docs/agents/models.md b/docs/docs/agents/models.md index acd242aa7..61fc350ee 100644 --- a/docs/docs/agents/models.md +++ b/docs/docs/agents/models.md @@ -211,7 +211,7 @@ output = agent.invoke( print(output["messages"][-1].text()) ``` -!!! version-added "New in LangGraph v0.6" +!!! version-added "Added in version 0.6.0" ::: @@ -351,11 +351,13 @@ If your desired LLM isn't officially supported by LangChain, consider these opti :::python 1. **Implement a custom LangChain chat model**: Create a model conforming to the [LangChain chat model interface](https://python.langchain.com/docs/how_to/custom_chat_model/). This enables full compatibility with LangGraph's agents and workflows but requires understanding of the LangChain framework. + ::: :::js 1. **Implement a custom LangChain chat model**: Create a model conforming to the [LangChain chat model interface](https://js.langchain.com/docs/how_to/custom_chat/). This enables full compatibility with LangGraph's agents and workflows but requires understanding of the LangChain framework. + ::: 2. **Direct invocation with custom streaming**: Use your model directly by [adding custom streaming logic](../how-tos/streaming.md#use-with-any-llm) with `StreamWriter`. @@ -371,6 +373,7 @@ If your desired LLM isn't officially supported by LangChain, consider these opti - [Force model to call a specific tool](https://python.langchain.com/docs/how_to/tool_choice/) - [All chat model how-to guides](https://python.langchain.com/docs/how_to/#chat-models) - [Chat model integrations](https://python.langchain.com/docs/integrations/chat/) + ::: :::js @@ -381,4 +384,5 @@ If your desired LLM isn't officially supported by LangChain, consider these opti - [Force model to call a specific tool](https://js.langchain.com/docs/how_to/tool_choice/) - [All chat model how-to guides](https://js.langchain.com/docs/how_to/#chat-models) - [Chat model integrations](https://js.langchain.com/docs/integrations/chat/) + ::: diff --git a/docs/docs/how-tos/tool-calling.md b/docs/docs/how-tos/tool-calling.md index b271d543f..c3d1c0742 100644 --- a/docs/docs/how-tos/tool-calling.md +++ b/docs/docs/how-tos/tool-calling.md @@ -244,7 +244,7 @@ output = agent.invoke( print(output["messages"][-1].text()) ``` -!!! version-added "New in langgraph>=0.6" +!!! version-added "Added in version 0.6.0" ::: diff --git a/libs/langgraph/langgraph/pregel/main.py b/libs/langgraph/langgraph/pregel/main.py index c57399568..3454a8169 100644 --- a/libs/langgraph/langgraph/pregel/main.py +++ b/libs/langgraph/langgraph/pregel/main.py @@ -2462,7 +2462,7 @@ class Pregel( input: The input to the graph. config: The configuration to use for the run. context: The static context to use for the run. - !!! version-added "Added in version 0.6.0." + !!! version-added "Added in version 0.6.0" stream_mode: The mode to stream output, defaults to `self.stream_mode`. Options are: @@ -2728,7 +2728,7 @@ class Pregel( input: The input to the graph. config: The configuration to use for the run. context: The static context to use for the run. - !!! version-added "Added in version 0.6.0." + !!! version-added "Added in version 0.6.0" stream_mode: The mode to stream output, defaults to `self.stream_mode`. Options are: @@ -3060,7 +3060,7 @@ class Pregel( input: The input data for the graph. It can be a dictionary or any other type. config: Optional. The configuration for the graph run. context: The static context to use for the run. - !!! version-added "Added in version 0.6.0." + !!! version-added "Added in version 0.6.0" stream_mode: Optional[str]. The stream mode for the graph run. Default is "values". print_mode: Accepts the same values as `stream_mode`, but only prints the output to the console, for debugging purposes. Does not affect the output of the graph in any way. output_keys: Optional. The output keys to retrieve from the graph run. @@ -3145,7 +3145,7 @@ class Pregel( input: The input data for the computation. It can be a dictionary or any other type. config: Optional. The configuration for the computation. context: The static context to use for the run. - !!! version-added "Added in version 0.6.0." + !!! version-added "Added in version 0.6.0" stream_mode: Optional. The stream mode for the computation. Default is "values". print_mode: Accepts the same values as `stream_mode`, but only prints the output to the console, for debugging purposes. Does not affect the output of the graph in any way. output_keys: Optional. The output keys to include in the result. Default is None. diff --git a/libs/langgraph/langgraph/types.py b/libs/langgraph/langgraph/types.py index 330dc3639..f5ebf99cb 100644 --- a/libs/langgraph/langgraph/types.py +++ b/libs/langgraph/langgraph/types.py @@ -106,7 +106,7 @@ else: class RetryPolicy(NamedTuple): """Configuration for retrying nodes. - !!! version-added "Added in version 0.2.24." + !!! version-added "Added in version 0.2.24" """ initial_interval: float = 0.5 @@ -148,7 +148,7 @@ _DEFAULT_INTERRUPT_ID = "placeholder-id" class Interrupt: """Information about an interrupt that occurred in a node. - !!! version-added "Added in version 0.2.24." + !!! version-added "Added in version 0.2.24" !!! version-changed "Changed in version v0.4.0" * `interrupt_id` was introduced as a property @@ -349,7 +349,7 @@ N = TypeVar("N", bound=Hashable) class Command(Generic[N], ToolOutputMixin): """One or more commands to update the graph's state and send messages to nodes. - !!! version-added "Added in version 0.2.24." + !!! version-added "Added in version 0.2.24" Args: graph: graph to send the command to. Supported values are: diff --git a/libs/sdk-py/langgraph_sdk/client.py b/libs/sdk-py/langgraph_sdk/client.py index f08d7b1fc..6749d4662 100644 --- a/libs/sdk-py/langgraph_sdk/client.py +++ b/libs/sdk-py/langgraph_sdk/client.py @@ -873,7 +873,7 @@ class AssistantsClient: config: Configuration to use for the graph. metadata: Metadata to add to assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" assistant_id: Assistant ID to use, will default to a random UUID if not provided. if_exists: How to handle duplicate creation. Defaults to 'raise' under the hood. Must be either 'raise' (raise error if duplicate), or 'do_nothing' (return existing assistant). @@ -944,7 +944,7 @@ class AssistantsClient: The graph ID is normally set in your langgraph.json configuration. If None, assistant will keep pointing to same graph. config: Configuration to use for the graph. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" metadata: Metadata to merge with existing assistant metadata. name: The new name for the assistant. headers: Optional custom headers to include with the request. @@ -1964,7 +1964,7 @@ class RunsClient: metadata: Metadata to assign to the run. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint: The checkpoint to resume from. checkpoint_during: (deprecated) Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. @@ -2174,7 +2174,7 @@ class RunsClient: metadata: Metadata to assign to the run. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint: The checkpoint to resume from. checkpoint_during: (deprecated) Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. @@ -2422,7 +2422,7 @@ class RunsClient: metadata: Metadata to assign to the run. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint: The checkpoint to resume from. checkpoint_during: (deprecated) Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. @@ -2883,7 +2883,7 @@ class CronClient: metadata: Metadata to assign to the cron job runs. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint_during: Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. @@ -2965,7 +2965,7 @@ class CronClient: metadata: Metadata to assign to the cron job runs. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint_during: Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. interrupt_after: Nodes to Nodes to interrupt immediately after they get executed. @@ -4131,7 +4131,7 @@ class SyncAssistantsClient: graph_id: The ID of the graph the assistant should use. The graph ID is normally set in your langgraph.json configuration. config: Configuration to use for the graph. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" metadata: Metadata to add to assistant. assistant_id: Assistant ID to use, will default to a random UUID if not provided. if_exists: How to handle duplicate creation. Defaults to 'raise' under the hood. @@ -4203,7 +4203,7 @@ class SyncAssistantsClient: The graph ID is normally set in your langgraph.json configuration. If None, assistant will keep pointing to same graph. config: Configuration to use for the graph. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" metadata: Metadata to merge with existing assistant metadata. name: The new name for the assistant. headers: Optional custom headers to include with the request. @@ -5198,7 +5198,7 @@ class SyncRunsClient: metadata: Metadata to assign to the run. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint: The checkpoint to resume from. checkpoint_during: (deprecated) Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. @@ -5404,7 +5404,7 @@ class SyncRunsClient: metadata: Metadata to assign to the run. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint: The checkpoint to resume from. checkpoint_during: (deprecated) Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. @@ -5652,7 +5652,7 @@ class SyncRunsClient: metadata: Metadata to assign to the run. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint: The checkpoint to resume from. checkpoint_during: (deprecated) Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. @@ -6093,7 +6093,7 @@ class SyncCronClient: metadata: Metadata to assign to the cron job runs. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint_during: Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. interrupt_after: Nodes to Nodes to interrupt immediately after they get executed. @@ -6171,7 +6171,7 @@ class SyncCronClient: metadata: Metadata to assign to the cron job runs. config: The configuration for the assistant. context: Static context to add to the assistant. - !!! version-added "Supported with langgraph>=0.6.0" + !!! version-added "Added in version 0.6.0" checkpoint_during: Whether to checkpoint during the run (or only at the end/interruption). interrupt_before: Nodes to interrupt immediately before they get executed. interrupt_after: Nodes to Nodes to interrupt immediately after they get executed.