mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-10 11:47:51 +02:00
chore: drop Python 3.9 (and syntax) (#6289)
* `strict=False` is the default, pyupgrade to min version 3.10 adds this to be explicit w/ behavior
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import asyncio
|
||||
import json
|
||||
from typing import Annotated, Optional
|
||||
from typing import Annotated
|
||||
|
||||
from langchain_community.retrievers import WikipediaRetriever
|
||||
from langchain_community.tools.tavily_search import TavilySearchResults
|
||||
@@ -51,7 +51,7 @@ class Subsection(BaseModel):
|
||||
class Section(BaseModel):
|
||||
section_title: str = Field(..., title="Title of the section")
|
||||
description: str = Field(..., title="Content of the section")
|
||||
subsections: Optional[list[Subsection]] = Field(
|
||||
subsections: list[Subsection] | None = Field(
|
||||
default=None,
|
||||
title="Titles and descriptions for each subsection of the Wikipedia page.",
|
||||
)
|
||||
@@ -201,8 +201,8 @@ def update_editor(editor, new_editor):
|
||||
|
||||
class InterviewState(TypedDict):
|
||||
messages: Annotated[list[AnyMessage], add_messages]
|
||||
references: Annotated[Optional[dict], update_references]
|
||||
editor: Annotated[Optional[Editor], update_editor]
|
||||
references: Annotated[dict | None, update_references]
|
||||
editor: Annotated[Editor | None, update_editor]
|
||||
|
||||
|
||||
gen_qn_prompt = ChatPromptTemplate.from_messages(
|
||||
@@ -321,7 +321,7 @@ async def search_engine(query: str):
|
||||
|
||||
async def gen_answer(
|
||||
state: InterviewState,
|
||||
config: Optional[RunnableConfig] = None,
|
||||
config: RunnableConfig | None = None,
|
||||
name: str = "Subject_Matter_Expert",
|
||||
max_str_len: int = 15000,
|
||||
):
|
||||
@@ -437,7 +437,7 @@ class SubSection(BaseModel):
|
||||
class WikiSection(BaseModel):
|
||||
section_title: str = Field(..., title="Title of the section")
|
||||
content: str = Field(..., title="Full content of the section")
|
||||
subsections: Optional[list[Subsection]] = Field(
|
||||
subsections: list[Subsection] | None = Field(
|
||||
default=None,
|
||||
title="Titles and descriptions for each subsection of the Wikipedia page.",
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ name = "langgraph-examples"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"langgraph-cli",
|
||||
"langgraph-sdk",
|
||||
|
||||
Reference in New Issue
Block a user