UpsertResponse Class — langchain Architecture
Architecture documentation for the UpsertResponse class in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e31c199b_12ef_599c_d5b0_1eef4c3ac6c9["UpsertResponse"] 44ffc3da_66a5_f9ca_57ac_f9a80e82f0c8["base.py"] e31c199b_12ef_599c_d5b0_1eef4c3ac6c9 -->|defined in| 44ffc3da_66a5_f9ca_57ac_f9a80e82f0c8
Relationship Graph
Source Code
libs/core/langchain_core/indexing/base.py lines 434–457
class UpsertResponse(TypedDict):
"""A generic response for upsert operations.
The upsert response will be used by abstractions that implement an upsert
operation for content that can be upserted by ID.
Upsert APIs that accept inputs with IDs and generate IDs internally
will return a response that includes the IDs that succeeded and the IDs
that failed.
If there are no failures, the failed list will be empty, and the order
of the IDs in the succeeded list will match the order of the input documents.
If there are failures, the response becomes ill defined, and a user of the API
cannot determine which generated ID corresponds to which input document.
It is recommended for users explicitly attach the IDs to the items being
indexed to avoid this issue.
"""
succeeded: list[str]
"""The IDs that were successfully indexed."""
failed: list[str]
"""The IDs that failed to index."""
Defined In
Source
Frequently Asked Questions
What is the UpsertResponse class?
UpsertResponse is a class in the langchain codebase, defined in libs/core/langchain_core/indexing/base.py.
Where is UpsertResponse defined?
UpsertResponse is defined in libs/core/langchain_core/indexing/base.py at line 434.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free