Envelope construction proxy (SPEC-003, SPEC-024).
Exposes the envelope builder, packer, reranker, CDR ranker, and formatter.
Source code in crp/sdk/proxies_more.py
| class _EnvelopeProxy:
"""Envelope construction proxy (SPEC-003, SPEC-024).
Exposes the envelope builder, packer, reranker, CDR ranker, and formatter.
"""
def __init__(self, orchestrator: Any) -> None:
self._orchestrator = orchestrator
def builder(self) -> Any:
"""Return the envelope ``construct`` function and ``EnvelopeState``.
Returns:
SimpleNamespace with ``construct`` and ``EnvelopeState``.
"""
from crp.envelope.builder import EnvelopeState, construct
return SimpleNamespace(construct=construct, EnvelopeState=EnvelopeState)
def packer(self) -> Any:
"""Return the graph-aware ``pack_facts`` function.
Returns:
pack_facts callable.
"""
from crp.envelope.packer import pack_facts
return pack_facts
def reranker(self) -> Any:
"""Return the cross-encoder ``rerank`` function.
Returns:
rerank callable.
"""
from crp.envelope.reranker import rerank
return rerank
def cdr(self) -> Any:
"""Return the Coverage-Differential Retrieval ``cdr_rank`` function.
Returns:
cdr_rank callable.
"""
from crp.envelope.cdr import cdr_rank
return cdr_rank
def formatter(self) -> Any:
"""Return the envelope ``format_envelope`` function.
Returns:
format_envelope callable.
"""
from crp.envelope.formatter import format_envelope
return format_envelope
|
builder()
Return the envelope construct function and EnvelopeState.
Returns:
| Type | Description |
Any | SimpleNamespace with construct and EnvelopeState. |
Source code in crp/sdk/proxies_more.py
| def builder(self) -> Any:
"""Return the envelope ``construct`` function and ``EnvelopeState``.
Returns:
SimpleNamespace with ``construct`` and ``EnvelopeState``.
"""
from crp.envelope.builder import EnvelopeState, construct
return SimpleNamespace(construct=construct, EnvelopeState=EnvelopeState)
|
packer()
Return the graph-aware pack_facts function.
Returns:
Source code in crp/sdk/proxies_more.py
| def packer(self) -> Any:
"""Return the graph-aware ``pack_facts`` function.
Returns:
pack_facts callable.
"""
from crp.envelope.packer import pack_facts
return pack_facts
|
reranker()
Return the cross-encoder rerank function.
Returns:
Source code in crp/sdk/proxies_more.py
| def reranker(self) -> Any:
"""Return the cross-encoder ``rerank`` function.
Returns:
rerank callable.
"""
from crp.envelope.reranker import rerank
return rerank
|
cdr()
Return the Coverage-Differential Retrieval cdr_rank function.
Returns:
Source code in crp/sdk/proxies_more.py
| def cdr(self) -> Any:
"""Return the Coverage-Differential Retrieval ``cdr_rank`` function.
Returns:
cdr_rank callable.
"""
from crp.envelope.cdr import cdr_rank
return cdr_rank
|
Return the envelope format_envelope function.
Returns:
| Type | Description |
Any | format_envelope callable. |
Source code in crp/sdk/proxies_more.py
| def formatter(self) -> Any:
"""Return the envelope ``format_envelope`` function.
Returns:
format_envelope callable.
"""
from crp.envelope.formatter import format_envelope
return format_envelope
|