fix(docs): capitalization, codeblock formatting, and hyperlinks, note blocks (#32235)

widespread cleanup attempt
This commit is contained in:
Mason Daugherty
2025-07-24 16:55:04 -04:00
committed by GitHub
parent 54542b9385
commit d53ebf367e
28 changed files with 356 additions and 358 deletions

View File

@@ -408,11 +408,10 @@ class ChatPerplexity(BaseChatModel):
) -> Runnable[LanguageModelInput, _DictOrPydantic]:
"""Model wrapper that returns outputs formatted to match the given schema for Preplexity.
Currently, Perplexity only supports "json_schema" method for structured output
as per their official documentation: https://docs.perplexity.ai/guides/structured-outputs
as per their `official documentation <https://docs.perplexity.ai/guides/structured-outputs>`__.
Args:
schema:
The output schema. Can be passed in as:
schema: The output schema. Can be passed in as:
- a JSON Schema,
- a TypedDict class,
@@ -420,7 +419,7 @@ class ChatPerplexity(BaseChatModel):
method: The method for steering model generation, currently only support:
- "json_schema": Use the JSON Schema to parse the model output
- ``'json_schema'``: Use the JSON Schema to parse the model output
include_raw:
@@ -429,7 +428,7 @@ class ChatPerplexity(BaseChatModel):
then both the raw model response (a BaseMessage) and the parsed model
response will be returned. If an error occurs during output parsing it
will be caught and returned as well. The final output is always a dict
with keys "raw", "parsed", and "parsing_error".
with keys ``'raw'``, ``'parsed'``, and ``'parsing_error'``.
strict:
Unsupported: whether to enable strict schema adherence when generating
@@ -441,13 +440,14 @@ class ChatPerplexity(BaseChatModel):
Returns:
A Runnable that takes same inputs as a :class:`langchain_core.language_models.chat.BaseChatModel`.
| If ``include_raw`` is False and ``schema`` is a Pydantic class, Runnable outputs an instance of ``schema`` (i.e., a Pydantic object). Otherwise, if ``include_raw`` is False then Runnable outputs a dict.
If ``include_raw`` is False and ``schema`` is a Pydantic class, Runnable outputs
an instance of ``schema`` (i.e., a Pydantic object). Otherwise, if ``include_raw`` is False then Runnable outputs a dict.
| If ``include_raw`` is True, then Runnable outputs a dict with keys:
If ``include_raw`` is True, then Runnable outputs a dict with keys:
- "raw": BaseMessage
- "parsed": None if there was a parsing error, otherwise the type depends on the ``schema`` as described above.
- "parsing_error": Optional[BaseException]
- ``'raw'``: BaseMessage
- ``'parsed'``: None if there was a parsing error, otherwise the type depends on the ``schema`` as described above.
- ``'parsing_error'``: Optional[BaseException]
""" # noqa: E501
if method in ("function_calling", "json_mode"):