mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 02:29:28 +08:00
Embedding endpoint URLs are now transparent end-to-end: Settings shows the exact URL DeepTutor will POST to, legacy `/v1`-style bases are migrated to full `/embeddings` / `/api/embed` URLs, the embedding client rejects known-provider misconfigurations early, and OpenRouter routes through the same exact-URL HTTP adapter as other providers. LlamaIndex RAG now refreshes embedding state before initialize/search/add, validates persisted vectors before retrieval, and reports invalid indexes with `needs_reindex: true` instead of raw NumPy/`NoneType` errors. Memory refresh strips `<think>` / `<thinking>` blocks from reasoning-model output before writing PROFILE.md / SUMMARY.md, and existing memory files self-repair on read. Also fixes a Deep Solve runtime regression where `MainSolver` still passed a stale `attachments` keyword to `SolverAgent.process()`. Adds release notes (assets/releases/ver1-3-2.md) and updates README. Made-with: Cursor
42 lines
1.3 KiB
Python
42 lines
1.3 KiB
Python
"""Unified embedding client and adapters for all DeepTutor modules.
|
|
|
|
Supported bindings are resolved by ``services.config.provider_runtime`` and
|
|
currently include openai, custom, azure_openai, cohere, jina, ollama, vllm,
|
|
siliconflow, aliyun, openrouter, plus legacy custom_openai_sdk configs.
|
|
"""
|
|
|
|
from .adapters import (
|
|
BaseEmbeddingAdapter,
|
|
CohereEmbeddingAdapter,
|
|
DashScopeMultiModalEmbeddingAdapter,
|
|
EmbeddingProviderError,
|
|
EmbeddingRequest,
|
|
EmbeddingResponse,
|
|
JinaEmbeddingAdapter,
|
|
OllamaEmbeddingAdapter,
|
|
OpenAICompatibleEmbeddingAdapter,
|
|
OpenAISDKEmbeddingAdapter,
|
|
)
|
|
from .client import EmbeddingClient, get_embedding_client, reset_embedding_client
|
|
from .config import EmbeddingConfig, get_embedding_config
|
|
from .validation import validate_embedding_batch
|
|
|
|
__all__ = [
|
|
"EmbeddingClient",
|
|
"EmbeddingConfig",
|
|
"get_embedding_client",
|
|
"get_embedding_config",
|
|
"reset_embedding_client",
|
|
"validate_embedding_batch",
|
|
"BaseEmbeddingAdapter",
|
|
"EmbeddingProviderError",
|
|
"EmbeddingRequest",
|
|
"EmbeddingResponse",
|
|
"OpenAICompatibleEmbeddingAdapter",
|
|
"OpenAISDKEmbeddingAdapter",
|
|
"DashScopeMultiModalEmbeddingAdapter",
|
|
"CohereEmbeddingAdapter",
|
|
"JinaEmbeddingAdapter",
|
|
"OllamaEmbeddingAdapter",
|
|
]
|