Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify type-naming of search param #2973

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions libs/sdk-py/langgraph_sdk/auth/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Authentication and authorization types for LangGraph.

Check notice on line 1 in libs/sdk-py/langgraph_sdk/auth/types.py

View workflow job for this annotation

GitHub Actions / benchmark

Benchmark results

......................................... fanout_to_subgraph_10x: Mean +- std dev: 62.0 ms +- 1.2 ms ......................................... fanout_to_subgraph_10x_sync: Mean +- std dev: 53.8 ms +- 0.8 ms ......................................... fanout_to_subgraph_10x_checkpoint: Mean +- std dev: 75.6 ms +- 1.3 ms ......................................... fanout_to_subgraph_10x_checkpoint_sync: Mean +- std dev: 96.0 ms +- 1.8 ms ......................................... fanout_to_subgraph_100x: Mean +- std dev: 612 ms +- 27 ms ......................................... fanout_to_subgraph_100x_sync: Mean +- std dev: 519 ms +- 10 ms ......................................... fanout_to_subgraph_100x_checkpoint: Mean +- std dev: 756 ms +- 18 ms ......................................... fanout_to_subgraph_100x_checkpoint_sync: Mean +- std dev: 960 ms +- 20 ms ......................................... react_agent_10x: Mean +- std dev: 30.9 ms +- 0.8 ms ......................................... react_agent_10x_sync: Mean +- std dev: 23.0 ms +- 0.4 ms ......................................... react_agent_10x_checkpoint: Mean +- std dev: 38.5 ms +- 1.0 ms ......................................... react_agent_10x_checkpoint_sync: Mean +- std dev: 36.9 ms +- 0.7 ms ......................................... react_agent_100x: Mean +- std dev: 342 ms +- 7 ms ......................................... react_agent_100x_sync: Mean +- std dev: 271 ms +- 4 ms ......................................... react_agent_100x_checkpoint: Mean +- std dev: 652 ms +- 13 ms ......................................... react_agent_100x_checkpoint_sync: Mean +- std dev: 640 ms +- 10 ms ......................................... wide_state_25x300: Mean +- std dev: 23.4 ms +- 0.5 ms ......................................... wide_state_25x300_sync: Mean +- std dev: 15.5 ms +- 0.3 ms ......................................... wide_state_25x300_checkpoint: Mean +- std dev: 253 ms +- 16 ms ......................................... wide_state_25x300_checkpoint_sync: Mean +- std dev: 247 ms +- 16 ms ......................................... wide_state_15x600: Mean +- std dev: 27.3 ms +- 0.6 ms ......................................... wide_state_15x600_sync: Mean +- std dev: 17.8 ms +- 0.2 ms ......................................... wide_state_15x600_checkpoint: Mean +- std dev: 432 ms +- 15 ms ......................................... wide_state_15x600_checkpoint_sync: Mean +- std dev: 428 ms +- 15 ms ......................................... wide_state_9x1200: Mean +- std dev: 27.5 ms +- 0.6 ms ......................................... wide_state_9x1200_sync: Mean +- std dev: 17.9 ms +- 0.2 ms ......................................... wide_state_9x1200_checkpoint: Mean +- std dev: 280 ms +- 14 ms ......................................... wide_state_9x1200_checkpoint_sync: Mean +- std dev: 275 ms +- 13 ms

Check notice on line 1 in libs/sdk-py/langgraph_sdk/auth/types.py

View workflow job for this annotation

GitHub Actions / benchmark

Comparison against main

+-----------------------------------------+---------+-----------------------+ | Benchmark | main | changes | +=========================================+=========+=======================+ | fanout_to_subgraph_100x_checkpoint | 819 ms | 756 ms: 1.08x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x | 648 ms | 612 ms: 1.06x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_checkpoint_sync | 980 ms | 960 ms: 1.02x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_100x_sync | 528 ms | 519 ms: 1.02x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_sync | 275 ms | 271 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint | 657 ms | 652 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x | 62.6 ms | 62.0 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | fanout_to_subgraph_10x_checkpoint_sync | 96.7 ms | 96.0 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | react_agent_10x_checkpoint_sync | 37.2 ms | 36.9 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_15x600 | 27.5 ms | 27.3 ms: 1.01x faster | +-----------------------------------------+---------+-----------------------+ | wide_state_9x1200_sync | 17.8 ms | 17.9 ms: 1.00x slower | +-----------------------------------------+---------+-----------------------+ | react_agent_100x_checkpoint_sync | 637 ms | 640 ms: 1.01x slower | +-----------------------------------------+---------+-----------------------+ | Geometric mean | (ref) | 1.01x faster | +-----------------------------------------+---------+-----------------------+ Benchmark hidden because not significant (16): wide_state_25x300, react_agent_100x, react_agent_10x, wide_state_9x1200_checkpoint, fanout_to_subgraph_10x_sync, wide_state_9x1200, react_agent_10x_sync, react_agent_10x_checkpoint, wide_state_9x1200_checkpoint_sync, wide_state_15x600_sync, fanout_to_subgraph_10x_checkpoint, wide_state_15x600_checkpoint_sync, wide_state_25x300_sync, wide_state_15x600_checkpoint, wide_state_25x300_checkpoint_sync, wide_state_25x300_checkpoint

This module defines the core types used for authentication, authorization, and
request handling in LangGraph. It includes user protocols, authentication contexts,
Expand Down Expand Up @@ -795,17 +795,8 @@
class StoreSearch(typing.TypedDict):
"""Operation to search for items within a specified namespace hierarchy."""

namespace_prefix: tuple[str, ...]
"""Hierarchical path prefix defining the search scope.

???+ example "Examples"

```python
() # Search entire store
("documents",) # Search all documents
("users", "content") # Search within user content
```
"""
namespace: tuple[str, ...]
"""Prefix filter for defining the search scope."""

filter: typing.Optional[dict[str, typing.Any]]
"""Key-value pairs for filtering results based on exact matches or comparison operators."""
Expand All @@ -823,8 +814,8 @@
class StoreListNamespaces(typing.TypedDict):
"""Operation to list and filter namespaces in the store."""

prefix: typing.Optional[tuple[str, ...]]
"""Optional conditions for filtering namespaces."""
namespace: typing.Optional[tuple[str, ...]]
"""Prefix filter namespaces."""

suffix: typing.Optional[tuple[str, ...]]
"""Optional conditions for filtering namespaces."""
Expand Down
2 changes: 1 addition & 1 deletion libs/sdk-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph-sdk"
version = "0.1.50"
version = "0.1.51"
description = "SDK for interacting with LangGraph API"
authors = []
license = "MIT"
Expand Down
Loading