Skip to content

Commit

Permalink
[CLI] Add openapi param to config
Browse files Browse the repository at this point in the history
For langraph api
  • Loading branch information
hinthornw authored Dec 14, 2024
2 parents cbe92e3 + 30e6b54 commit 87fba0e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
33 changes: 33 additions & 0 deletions libs/cli/langgraph_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,42 @@ class StoreConfig(TypedDict, total=False):
"""Configuration for vector embeddings in store."""


class SecurityConfig(TypedDict, total=False):
securitySchemes: dict
security: list
# path => {method => security}
paths: dict[str, dict[str, list]]


class AuthConfig(TypedDict, total=False):
path: str
"""Path to the authentication function in a Python file."""
disable_studio_auth: bool
"""Whether to disable auth when connecting from the LangSmith Studio."""
openapi: SecurityConfig
"""The schema to use for updating the openapi spec.
Example:
{
"securitySchemes": {
"OAuth2": {
"type": "oauth2",
"flows": {
"password": {
"tokenUrl": "/token",
"scopes": {
"me": "Read information about the current user",
"items": "Access to create and manage items"
}
}
}
}
},
"security": [
{"OAuth2": ["me"]} # Default security requirement for all endpoints
]
}
"""


class Config(TypedDict, total=False):
Expand Down
8 changes: 4 additions & 4 deletions libs/cli/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions libs/cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph-cli"
version = "0.1.62"
version = "0.1.63"
description = "CLI for interacting with LangGraph API"
authors = []
license = "MIT"
Expand All @@ -14,7 +14,7 @@ langgraph = "langgraph_cli.cli:cli"
[tool.poetry.dependencies]
python = "^3.9.0,<4.0"
click = "^8.1.7"
langgraph-api = { version = ">=0.0.7,<0.1.0", optional = true, python = ">=3.11,<4.0" }
langgraph-api = { version = ">=0.0.8,<0.1.0", optional = true, python = ">=3.11,<4.0" }
python-dotenv = { version = ">=0.8.0", optional = true }

[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit 87fba0e

Please sign in to comment.