indoxrouter 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- indoxRouter/__init__.py +83 -0
- indoxRouter/client.py +564 -218
- indoxRouter/client_resourses/__init__.py +20 -0
- indoxRouter/client_resourses/base.py +67 -0
- indoxRouter/client_resourses/chat.py +144 -0
- indoxRouter/client_resourses/completion.py +138 -0
- indoxRouter/client_resourses/embedding.py +83 -0
- indoxRouter/client_resourses/image.py +116 -0
- indoxRouter/client_resourses/models.py +114 -0
- indoxRouter/config.py +151 -0
- indoxRouter/constants/__init__.py +81 -0
- indoxRouter/exceptions/__init__.py +70 -0
- indoxRouter/models/__init__.py +111 -0
- indoxRouter/providers/__init__.py +50 -50
- indoxRouter/providers/ai21labs.json +128 -0
- indoxRouter/providers/base_provider.py +62 -30
- indoxRouter/providers/claude.json +164 -0
- indoxRouter/providers/cohere.json +116 -0
- indoxRouter/providers/databricks.json +110 -0
- indoxRouter/providers/deepseek.json +110 -0
- indoxRouter/providers/google.json +128 -0
- indoxRouter/providers/meta.json +128 -0
- indoxRouter/providers/mistral.json +146 -0
- indoxRouter/providers/nvidia.json +110 -0
- indoxRouter/providers/openai.json +308 -0
- indoxRouter/providers/openai.py +471 -72
- indoxRouter/providers/qwen.json +110 -0
- indoxRouter/utils/__init__.py +240 -0
- indoxrouter-0.1.2.dist-info/LICENSE +21 -0
- indoxrouter-0.1.2.dist-info/METADATA +259 -0
- indoxrouter-0.1.2.dist-info/RECORD +33 -0
- indoxRouter/api_endpoints.py +0 -336
- indoxRouter/client_package.py +0 -138
- indoxRouter/init_db.py +0 -71
- indoxRouter/main.py +0 -711
- indoxRouter/migrations/__init__.py +0 -1
- indoxRouter/migrations/env.py +0 -98
- indoxRouter/migrations/versions/__init__.py +0 -1
- indoxRouter/migrations/versions/initial_schema.py +0 -84
- indoxRouter/providers/ai21.py +0 -268
- indoxRouter/providers/claude.py +0 -177
- indoxRouter/providers/cohere.py +0 -171
- indoxRouter/providers/databricks.py +0 -166
- indoxRouter/providers/deepseek.py +0 -166
- indoxRouter/providers/google.py +0 -216
- indoxRouter/providers/llama.py +0 -164
- indoxRouter/providers/meta.py +0 -227
- indoxRouter/providers/mistral.py +0 -182
- indoxRouter/providers/nvidia.py +0 -164
- indoxrouter-0.1.0.dist-info/METADATA +0 -179
- indoxrouter-0.1.0.dist-info/RECORD +0 -27
- {indoxrouter-0.1.0.dist-info → indoxrouter-0.1.2.dist-info}/WHEEL +0 -0
- {indoxrouter-0.1.0.dist-info → indoxrouter-0.1.2.dist-info}/top_level.txt +0 -0
indoxRouter/__init__.py
CHANGED
@@ -0,0 +1,83 @@
|
|
1
|
+
"""
|
2
|
+
indoxRouter - A unified interface for various LLM providers.
|
3
|
+
|
4
|
+
This package provides a simple and consistent way to interact with different
|
5
|
+
LLM providers like OpenAI, Claude, Mistral, and more.
|
6
|
+
"""
|
7
|
+
|
8
|
+
__version__ = "0.1.0"
|
9
|
+
|
10
|
+
from .client import Client, IndoxRouter
|
11
|
+
from .config import Config, get_config
|
12
|
+
from .models import (
|
13
|
+
ChatMessage,
|
14
|
+
ChatResponse,
|
15
|
+
CompletionResponse,
|
16
|
+
EmbeddingResponse,
|
17
|
+
ImageResponse,
|
18
|
+
ModelInfo,
|
19
|
+
Usage,
|
20
|
+
)
|
21
|
+
from .exceptions import (
|
22
|
+
IndoxRouterError,
|
23
|
+
AuthenticationError,
|
24
|
+
ProviderError,
|
25
|
+
ProviderNotFoundError,
|
26
|
+
ModelNotFoundError,
|
27
|
+
InvalidParametersError,
|
28
|
+
RequestError,
|
29
|
+
)
|
30
|
+
from .constants import (
|
31
|
+
DEFAULT_TEMPERATURE,
|
32
|
+
DEFAULT_MAX_TOKENS,
|
33
|
+
DEFAULT_TOP_P,
|
34
|
+
DEFAULT_FREQUENCY_PENALTY,
|
35
|
+
DEFAULT_PRESENCE_PENALTY,
|
36
|
+
DEFAULT_IMAGE_SIZE,
|
37
|
+
DEFAULT_IMAGE_COUNT,
|
38
|
+
)
|
39
|
+
from .utils import (
|
40
|
+
count_tokens,
|
41
|
+
calculate_cost,
|
42
|
+
format_timestamp,
|
43
|
+
)
|
44
|
+
|
45
|
+
__all__ = [
|
46
|
+
# Main client
|
47
|
+
"Client",
|
48
|
+
"IndoxRouter",
|
49
|
+
# Configuration
|
50
|
+
"Config",
|
51
|
+
"get_config",
|
52
|
+
# Database
|
53
|
+
"Database",
|
54
|
+
"get_database",
|
55
|
+
# Models
|
56
|
+
"ChatMessage",
|
57
|
+
"ChatResponse",
|
58
|
+
"CompletionResponse",
|
59
|
+
"EmbeddingResponse",
|
60
|
+
"ImageResponse",
|
61
|
+
"ModelInfo",
|
62
|
+
"Usage",
|
63
|
+
# Exceptions
|
64
|
+
"IndoxRouterError",
|
65
|
+
"AuthenticationError",
|
66
|
+
"ProviderError",
|
67
|
+
"ProviderNotFoundError",
|
68
|
+
"ModelNotFoundError",
|
69
|
+
"InvalidParametersError",
|
70
|
+
"RequestError",
|
71
|
+
# Constants
|
72
|
+
"DEFAULT_TEMPERATURE",
|
73
|
+
"DEFAULT_MAX_TOKENS",
|
74
|
+
"DEFAULT_TOP_P",
|
75
|
+
"DEFAULT_FREQUENCY_PENALTY",
|
76
|
+
"DEFAULT_PRESENCE_PENALTY",
|
77
|
+
"DEFAULT_IMAGE_SIZE",
|
78
|
+
"DEFAULT_IMAGE_COUNT",
|
79
|
+
# Utilities
|
80
|
+
"count_tokens",
|
81
|
+
"calculate_cost",
|
82
|
+
"format_timestamp",
|
83
|
+
]
|