hammad-python 0.0.14__py3-none-any.whl → 0.0.15__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 (101) hide show
  1. hammad_python-0.0.15.dist-info/METADATA +184 -0
  2. hammad_python-0.0.15.dist-info/RECORD +4 -0
  3. hammad/__init__.py +0 -1
  4. hammad/ai/__init__.py +0 -1
  5. hammad/ai/_utils.py +0 -142
  6. hammad/ai/completions/__init__.py +0 -45
  7. hammad/ai/completions/client.py +0 -684
  8. hammad/ai/completions/create.py +0 -710
  9. hammad/ai/completions/settings.py +0 -100
  10. hammad/ai/completions/types.py +0 -792
  11. hammad/ai/completions/utils.py +0 -486
  12. hammad/ai/embeddings/__init__.py +0 -35
  13. hammad/ai/embeddings/client/__init__.py +0 -1
  14. hammad/ai/embeddings/client/base_embeddings_client.py +0 -26
  15. hammad/ai/embeddings/client/fastembed_text_embeddings_client.py +0 -200
  16. hammad/ai/embeddings/client/litellm_embeddings_client.py +0 -288
  17. hammad/ai/embeddings/create.py +0 -159
  18. hammad/ai/embeddings/types.py +0 -69
  19. hammad/cache/__init__.py +0 -40
  20. hammad/cache/base_cache.py +0 -181
  21. hammad/cache/cache.py +0 -169
  22. hammad/cache/decorators.py +0 -261
  23. hammad/cache/file_cache.py +0 -80
  24. hammad/cache/ttl_cache.py +0 -74
  25. hammad/cli/__init__.py +0 -33
  26. hammad/cli/animations.py +0 -573
  27. hammad/cli/plugins.py +0 -781
  28. hammad/cli/styles/__init__.py +0 -55
  29. hammad/cli/styles/settings.py +0 -139
  30. hammad/cli/styles/types.py +0 -358
  31. hammad/cli/styles/utils.py +0 -480
  32. hammad/data/__init__.py +0 -56
  33. hammad/data/collections/__init__.py +0 -34
  34. hammad/data/collections/base_collection.py +0 -58
  35. hammad/data/collections/collection.py +0 -452
  36. hammad/data/collections/searchable_collection.py +0 -556
  37. hammad/data/collections/vector_collection.py +0 -596
  38. hammad/data/configurations/__init__.py +0 -35
  39. hammad/data/configurations/configuration.py +0 -564
  40. hammad/data/databases/__init__.py +0 -21
  41. hammad/data/databases/database.py +0 -902
  42. hammad/data/models/__init__.py +0 -44
  43. hammad/data/models/base/__init__.py +0 -35
  44. hammad/data/models/base/fields.py +0 -546
  45. hammad/data/models/base/model.py +0 -1078
  46. hammad/data/models/base/utils.py +0 -280
  47. hammad/data/models/pydantic/__init__.py +0 -55
  48. hammad/data/models/pydantic/converters.py +0 -632
  49. hammad/data/models/pydantic/models/__init__.py +0 -28
  50. hammad/data/models/pydantic/models/arbitrary_model.py +0 -46
  51. hammad/data/models/pydantic/models/cacheable_model.py +0 -79
  52. hammad/data/models/pydantic/models/fast_model.py +0 -318
  53. hammad/data/models/pydantic/models/function_model.py +0 -176
  54. hammad/data/models/pydantic/models/subscriptable_model.py +0 -63
  55. hammad/data/types/__init__.py +0 -41
  56. hammad/data/types/file.py +0 -358
  57. hammad/data/types/multimodal/__init__.py +0 -24
  58. hammad/data/types/multimodal/audio.py +0 -96
  59. hammad/data/types/multimodal/image.py +0 -80
  60. hammad/data/types/text.py +0 -1066
  61. hammad/formatting/__init__.py +0 -38
  62. hammad/formatting/json/__init__.py +0 -21
  63. hammad/formatting/json/converters.py +0 -152
  64. hammad/formatting/text/__init__.py +0 -63
  65. hammad/formatting/text/converters.py +0 -723
  66. hammad/formatting/text/markdown.py +0 -131
  67. hammad/formatting/yaml/__init__.py +0 -26
  68. hammad/formatting/yaml/converters.py +0 -5
  69. hammad/logging/__init__.py +0 -35
  70. hammad/logging/decorators.py +0 -834
  71. hammad/logging/logger.py +0 -954
  72. hammad/mcp/__init__.py +0 -50
  73. hammad/mcp/client/__init__.py +0 -1
  74. hammad/mcp/client/client.py +0 -523
  75. hammad/mcp/client/client_service.py +0 -393
  76. hammad/mcp/client/settings.py +0 -178
  77. hammad/mcp/servers/__init__.py +0 -1
  78. hammad/mcp/servers/launcher.py +0 -1161
  79. hammad/performance/__init__.py +0 -36
  80. hammad/performance/imports.py +0 -231
  81. hammad/performance/runtime/__init__.py +0 -32
  82. hammad/performance/runtime/decorators.py +0 -142
  83. hammad/performance/runtime/run.py +0 -299
  84. hammad/py.typed +0 -0
  85. hammad/service/__init__.py +0 -49
  86. hammad/service/create.py +0 -532
  87. hammad/service/decorators.py +0 -285
  88. hammad/typing/__init__.py +0 -407
  89. hammad/web/__init__.py +0 -43
  90. hammad/web/http/__init__.py +0 -1
  91. hammad/web/http/client.py +0 -944
  92. hammad/web/models.py +0 -245
  93. hammad/web/openapi/__init__.py +0 -1
  94. hammad/web/openapi/client.py +0 -740
  95. hammad/web/search/__init__.py +0 -1
  96. hammad/web/search/client.py +0 -988
  97. hammad/web/utils.py +0 -472
  98. hammad_python-0.0.14.dist-info/METADATA +0 -70
  99. hammad_python-0.0.14.dist-info/RECORD +0 -99
  100. {hammad_python-0.0.14.dist-info → hammad_python-0.0.15.dist-info}/WHEEL +0 -0
  101. {hammad_python-0.0.14.dist-info → hammad_python-0.0.15.dist-info}/licenses/LICENSE +0 -0
@@ -1,100 +0,0 @@
1
- """hammad.ai.completions.settings"""
2
-
3
- from typing import Any, Dict, List, Literal, Optional, Union
4
- import sys
5
- from httpx import Timeout
6
-
7
- if sys.version_info >= (3, 12):
8
- from typing import TypedDict
9
- else:
10
- from typing_extensions import TypedDict
11
-
12
- try:
13
- from openai.types.chat import (
14
- ChatCompletionModality,
15
- ChatCompletionPredictionContentParam,
16
- ChatCompletionAudioParam,
17
- )
18
- except ImportError:
19
- raise ImportError(
20
- "Using the `hammad.ai.completions` extension requires the `openai` package to be installed.\n"
21
- "Please either install the `openai` package, or install the `hammad.ai` extension with:\n"
22
- "`pip install 'hammad-python[ai]'"
23
- )
24
-
25
-
26
- __all__ = (
27
- "CompletionsModelSettings",
28
- "CompletionsSettings",
29
- )
30
-
31
-
32
- class OpenAIWebSearchUserLocationApproximate(TypedDict):
33
- city: str
34
- country: str
35
- region: str
36
- timezone: str
37
-
38
-
39
- class OpenAIWebSearchUserLocation(TypedDict):
40
- approximate: OpenAIWebSearchUserLocationApproximate
41
- type: Literal["approximate"]
42
-
43
-
44
- class OpenAIWebSearchOptions(TypedDict, total=False):
45
- search_context_size: Optional[Literal["low", "medium", "high"]]
46
- user_location: Optional[OpenAIWebSearchUserLocation]
47
-
48
-
49
- class AnthropicThinkingParam(TypedDict, total=False):
50
- type: Literal["enabled"]
51
- budget_tokens: int
52
-
53
-
54
- class CompletionsModelSettings(TypedDict, total=False):
55
- """Accepted **MODEL** specific settings for the `litellm` completion function."""
56
-
57
- timeout: Optional[Union[float, str, Timeout]]
58
- temperature: Optional[float]
59
- top_p: Optional[float]
60
- n: Optional[int]
61
- stream: Optional[bool]
62
- stream_options: Optional[Dict[str, Any]]
63
- stop: Optional[str]
64
- max_completion_tokens: Optional[int]
65
- max_tokens: Optional[int]
66
- modalities: Optional[List[ChatCompletionModality]]
67
- prediction: Optional[ChatCompletionPredictionContentParam]
68
- audio: Optional[ChatCompletionAudioParam]
69
- presence_penalty: Optional[float]
70
- frequency_penalty: Optional[float]
71
- logit_bias: Optional[Dict[str, float]]
72
- user: Optional[str]
73
- reasoning_effort: Optional[Literal["low", "medium", "high"]]
74
- # NOTE: response_format is not used within the `completions` resource
75
- # in place of `instructor` and the `type` parameter
76
- seed: Optional[int]
77
- tools: Optional[List]
78
- tool_choice: Optional[Union[str, Dict[str, Any]]]
79
- logprobs: Optional[bool]
80
- top_logprobs: Optional[int]
81
- parallel_tool_calls: Optional[bool]
82
- web_search_options: Optional[OpenAIWebSearchOptions]
83
- deployment_id: Optional[str]
84
- extra_headers: Optional[Dict[str, str]]
85
- base_url: Optional[str]
86
- functions: Optional[List]
87
- function_call: Optional[str]
88
- # set api_base, api_version, api_key
89
- api_version: Optional[str]
90
- api_key: Optional[str]
91
- model_list: Optional[list]
92
- # Optional liteLLM function params
93
- thinking: Optional[AnthropicThinkingParam]
94
-
95
-
96
- class CompletionsSettings(CompletionsModelSettings, total=False):
97
- """Accepted settings for the `litellm` completion function."""
98
-
99
- model: str
100
- messages: List