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