mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 14:50:00 +00:00
lint
This commit is contained in:
parent
18824b5761
commit
57fd8887d8
@ -1,4 +1,4 @@
|
||||
from typing import Literal
|
||||
from typing import Literal, Optional
|
||||
|
||||
from langchain_core.agents import AgentAction
|
||||
|
||||
@ -21,7 +21,7 @@ def _escape(xml: str) -> str:
|
||||
def format_xml(
|
||||
intermediate_steps: list[tuple[AgentAction, str]],
|
||||
*,
|
||||
escape_format: Literal["minimal"] | None = "minimal",
|
||||
escape_format: Optional[Literal["minimal"]] = "minimal",
|
||||
) -> str:
|
||||
"""Format the intermediate steps as XML.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import re
|
||||
from typing import Literal, Union
|
||||
from typing import Literal, Union, Optional
|
||||
|
||||
from langchain_core.agents import AgentAction, AgentFinish
|
||||
from pydantic import Field
|
||||
@ -56,7 +56,7 @@ class XMLAgentOutputParser(AgentOutputParser):
|
||||
contains malformed XML structure.
|
||||
"""
|
||||
|
||||
escape_format: Literal["minimal"] | None = Field(default="minimal")
|
||||
escape_format: Optional[Literal["minimal"]] = Field(default="minimal")
|
||||
"""The format to use for escaping XML characters.
|
||||
|
||||
minimal - uses custom delimiters to replace XML tags within content,
|
||||
|
Loading…
Reference in New Issue
Block a user