Files
PolyGateway/src/polygateway/__init__.py
T
iomgaa 31942f55f1 docs: document completion verdict and bump version to 1.3.10
CHANGELOG 1.3.10 (unreleased) with behaviour-change and breaking
sections, README capability rows and a 1.3.10 section, ARCHITECTURE
section 15 plus 6.2/7 updates, schema doc for the stream_end column,
migration impact notes, ROADMAP entry, .env.example MISSING_DONE
semantics, and a revision pointer on the 1.3.9 design. Follow-ups
filed as #32 and #33.
2026-10-15 00:03:15 -04:00

108 lines
2.7 KiB
Python

"""PolyGateway: 实验室统一的大语言模型(LLM/VLM/OCR)调度与中转库。
治理单位是一次模型调用: 多源选择、限流、错误分类与重试、熔断、响应缓存、
流式活性看门狗、遥测。架构单一事实源见 research-wiki/ARCHITECTURE.md。
顶层导出即公共 API 面: 错误四分类必须从这里引用(ARCH §5.1 约定②)。
"""
from polygateway.client import GatewayClient, gather_bounded
from polygateway.config import EmbeddingSettings, GatewaySettings, OcrSettings
from polygateway.embedding import EmbeddingClient
from polygateway.errors import (
AllSourcesExhausted,
CallDeadlineExceeded,
CircuitOpenError,
GatewayUnavailableError,
GovernanceBackendError,
PolyGatewayError,
RequestRejectedError,
ResultInvalidError,
SourceDeadError,
SourceNotConfiguredError,
TransientError,
)
from polygateway.ocr import OcrClient
from polygateway.pricing import ModelPrice, PricingTable
from polygateway.providers import (
DEFAULT_PROFILES,
ProviderProfile,
ThinkingWire,
register_provider,
)
from polygateway.telemetry.schema import telemetry_schema_sql
from polygateway.thinking import (
ThinkingCapability,
ThinkingResolution,
ThinkingUnsupportedError,
get_capability,
register_capability,
resolve_thinking,
)
from polygateway.types import (
EFFORT_ORDER,
CallStats,
Effort,
EmbeddingResponse,
LLMResponse,
OcrLayoutElement,
OcrLayoutResult,
OcrTextResult,
OpenAIChatCompletion,
ResponseMode,
SourceConfig,
StreamEnd,
TelemetryStatus,
ThinkingObservation,
)
__version__ = "1.3.10"
__all__ = [
"DEFAULT_PROFILES",
"EFFORT_ORDER",
"Effort",
"AllSourcesExhausted",
"CallStats",
"CallDeadlineExceeded",
"CircuitOpenError",
"EmbeddingClient",
"EmbeddingResponse",
"EmbeddingSettings",
"GatewayClient",
"GatewaySettings",
"GatewayUnavailableError",
"GovernanceBackendError",
"LLMResponse",
"ResponseMode",
"StreamEnd",
"OpenAIChatCompletion",
"ModelPrice",
"OcrClient",
"OcrLayoutElement",
"OcrLayoutResult",
"OcrSettings",
"OcrTextResult",
"PolyGatewayError",
"PricingTable",
"ProviderProfile",
"RequestRejectedError",
"ResultInvalidError",
"SourceConfig",
"SourceDeadError",
"SourceNotConfiguredError",
"TelemetryStatus",
"ThinkingCapability",
"ThinkingObservation",
"ThinkingResolution",
"ThinkingUnsupportedError",
"ThinkingWire",
"TransientError",
"__version__",
"gather_bounded",
"get_capability",
"register_capability",
"register_provider",
"resolve_thinking",
"telemetry_schema_sql",
]