diff --git a/libs/community/langchain_community/graph_vectorstores/visualize.py b/libs/community/langchain_community/graph_vectorstores/visualize.py index 7dd0f1dcfcf..8c745a10d37 100644 --- a/libs/community/langchain_community/graph_vectorstores/visualize.py +++ b/libs/community/langchain_community/graph_vectorstores/visualize.py @@ -20,7 +20,7 @@ _EDGE_DIRECTION = { "bidir": "both", } -_WORD_RE = re.compile("\s*\S+") +_WORD_RE = re.compile(r"\s*\S+") def _split_prefix(s: str, max_chars: int = 50) -> str: diff --git a/libs/community/langchain_community/llms/outlines.py b/libs/community/langchain_community/llms/outlines.py index 7636084a6eb..25be8dcb4a8 100644 --- a/libs/community/langchain_community/llms/outlines.py +++ b/libs/community/langchain_community/llms/outlines.py @@ -59,7 +59,7 @@ class Outlines(LLM): """Whether to stream the results, token by token.""" regex: Optional[str] = None - """Regular expression for structured generation. + r"""Regular expression for structured generation. If provided, Outlines will guarantee that the generated text matches this regex. This can be useful for generating structured outputs like IP addresses, dates, etc.