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.
Files changed (53) hide show
  1. indoxRouter/__init__.py +83 -0
  2. indoxRouter/client.py +564 -218
  3. indoxRouter/client_resourses/__init__.py +20 -0
  4. indoxRouter/client_resourses/base.py +67 -0
  5. indoxRouter/client_resourses/chat.py +144 -0
  6. indoxRouter/client_resourses/completion.py +138 -0
  7. indoxRouter/client_resourses/embedding.py +83 -0
  8. indoxRouter/client_resourses/image.py +116 -0
  9. indoxRouter/client_resourses/models.py +114 -0
  10. indoxRouter/config.py +151 -0
  11. indoxRouter/constants/__init__.py +81 -0
  12. indoxRouter/exceptions/__init__.py +70 -0
  13. indoxRouter/models/__init__.py +111 -0
  14. indoxRouter/providers/__init__.py +50 -50
  15. indoxRouter/providers/ai21labs.json +128 -0
  16. indoxRouter/providers/base_provider.py +62 -30
  17. indoxRouter/providers/claude.json +164 -0
  18. indoxRouter/providers/cohere.json +116 -0
  19. indoxRouter/providers/databricks.json +110 -0
  20. indoxRouter/providers/deepseek.json +110 -0
  21. indoxRouter/providers/google.json +128 -0
  22. indoxRouter/providers/meta.json +128 -0
  23. indoxRouter/providers/mistral.json +146 -0
  24. indoxRouter/providers/nvidia.json +110 -0
  25. indoxRouter/providers/openai.json +308 -0
  26. indoxRouter/providers/openai.py +471 -72
  27. indoxRouter/providers/qwen.json +110 -0
  28. indoxRouter/utils/__init__.py +240 -0
  29. indoxrouter-0.1.2.dist-info/LICENSE +21 -0
  30. indoxrouter-0.1.2.dist-info/METADATA +259 -0
  31. indoxrouter-0.1.2.dist-info/RECORD +33 -0
  32. indoxRouter/api_endpoints.py +0 -336
  33. indoxRouter/client_package.py +0 -138
  34. indoxRouter/init_db.py +0 -71
  35. indoxRouter/main.py +0 -711
  36. indoxRouter/migrations/__init__.py +0 -1
  37. indoxRouter/migrations/env.py +0 -98
  38. indoxRouter/migrations/versions/__init__.py +0 -1
  39. indoxRouter/migrations/versions/initial_schema.py +0 -84
  40. indoxRouter/providers/ai21.py +0 -268
  41. indoxRouter/providers/claude.py +0 -177
  42. indoxRouter/providers/cohere.py +0 -171
  43. indoxRouter/providers/databricks.py +0 -166
  44. indoxRouter/providers/deepseek.py +0 -166
  45. indoxRouter/providers/google.py +0 -216
  46. indoxRouter/providers/llama.py +0 -164
  47. indoxRouter/providers/meta.py +0 -227
  48. indoxRouter/providers/mistral.py +0 -182
  49. indoxRouter/providers/nvidia.py +0 -164
  50. indoxrouter-0.1.0.dist-info/METADATA +0 -179
  51. indoxrouter-0.1.0.dist-info/RECORD +0 -27
  52. {indoxrouter-0.1.0.dist-info → indoxrouter-0.1.2.dist-info}/WHEEL +0 -0
  53. {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
+ ]