maitai-python 1.1.35__tar.gz → 1.1.36__tar.gz

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 (52) hide show
  1. {maitai_python-1.1.35 → maitai_python-1.1.36}/PKG-INFO +1 -1
  2. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_maitai.py +6 -0
  3. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_maitai_async.py +6 -0
  4. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/version.py +1 -1
  5. maitai_python-1.1.36/maitai_gen/billing/__init__.py +75 -0
  6. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/chat/__init__.py +3 -0
  7. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_python.egg-info/PKG-INFO +1 -1
  8. maitai_python-1.1.35/maitai_gen/billing/__init__.py +0 -31
  9. {maitai_python-1.1.35 → maitai_python-1.1.36}/README.md +0 -0
  10. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/__init__.py +0 -0
  11. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_azure.py +0 -0
  12. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_config.py +0 -0
  13. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_config_listener_thread.py +0 -0
  14. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_context.py +0 -0
  15. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_evaluator.py +0 -0
  16. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_inference.py +0 -0
  17. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_maitai_client.py +0 -0
  18. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_types.py +0 -0
  19. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/_utils.py +0 -0
  20. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai/tools/__init__.py +0 -0
  21. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/__init__.py +0 -0
  22. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/config/__init__.py +0 -0
  23. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/config/config_service.py +0 -0
  24. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/processes/__init__.py +0 -0
  25. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/processes/io_thread.py +0 -0
  26. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/processes/websocket_listener_thread.py +0 -0
  27. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/utils/__init__.py +0 -0
  28. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/utils/proto_utils.py +0 -0
  29. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_common/utils/types.py +0 -0
  30. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/__init__.py +0 -0
  31. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/annotation/__init__.py +0 -0
  32. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/application/__init__.py +0 -0
  33. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/backtest/__init__.py +0 -0
  34. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/company/__init__.py +0 -0
  35. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/config/__init__.py +0 -0
  36. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/embedding/__init__.py +0 -0
  37. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/event/__init__.py +0 -0
  38. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/inference/__init__.py +0 -0
  39. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/key/__init__.py +0 -0
  40. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/metric/__init__.py +0 -0
  41. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/model/__init__.py +0 -0
  42. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/notification/__init__.py +0 -0
  43. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/rates/__init__.py +0 -0
  44. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/sandbox/__init__.py +0 -0
  45. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/sentinel/__init__.py +0 -0
  46. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_gen/session/__init__.py +0 -0
  47. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_python.egg-info/SOURCES.txt +0 -0
  48. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_python.egg-info/dependency_links.txt +0 -0
  49. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_python.egg-info/requires.txt +0 -0
  50. {maitai_python-1.1.35 → maitai_python-1.1.36}/maitai_python.egg-info/top_level.txt +0 -0
  51. {maitai_python-1.1.35 → maitai_python-1.1.36}/setup.cfg +0 -0
  52. {maitai_python-1.1.35 → maitai_python-1.1.36}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maitai-python
3
- Version: 1.1.35
3
+ Version: 1.1.36
4
4
  Summary: Maitai SDK for Python
5
5
  Home-page: https://docs.trymaitai.ai
6
6
  Author: Maitai
@@ -57,6 +57,7 @@ class Maitai:
57
57
  openai_api_key: Optional[str] = None,
58
58
  groq_api_key: Optional[str] = None,
59
59
  anthropic_api_key: Optional[str] = None,
60
+ cerebras_api_key: Optional[str] = None,
60
61
  organization: Optional[str] = None,
61
62
  project: Optional[str] = None,
62
63
  base_url: Union[str, httpx.URL, None] = None,
@@ -78,12 +79,16 @@ class Maitai:
78
79
  groq_api_key = api_key
79
80
  if not anthropic_api_key:
80
81
  anthropic_api_key = api_key
82
+ if not cerebras_api_key:
83
+ cerebras_api_key = api_key
81
84
  if openai_api_key:
82
85
  config.auth_keys.openai_api_key.key_value = openai_api_key
83
86
  if groq_api_key:
84
87
  config.auth_keys.groq_api_key.key_value = groq_api_key
85
88
  if anthropic_api_key:
86
89
  config.auth_keys.anthropic_api_key.key_value = anthropic_api_key
90
+ if cerebras_api_key:
91
+ config.auth_keys.cerebras_api_key.key_value = cerebras_api_key
87
92
  self._client = None
88
93
  if api_key or openai_api_key or os.environ.get("OPENAI_API_KEY"):
89
94
  self._client = openai.OpenAI(
@@ -313,6 +318,7 @@ class Completions:
313
318
  auth_keys=config.auth_keys,
314
319
  metadata=metadata,
315
320
  safe_mode=safe_mode,
321
+ extra_headers=extra_headers or {},
316
322
  )
317
323
  if self._client_params is not None:
318
324
  chat_request.client_params = self._client_params
@@ -57,6 +57,7 @@ class MaitaiAsync:
57
57
  openai_api_key: Optional[str] = None,
58
58
  groq_api_key: Optional[str] = None,
59
59
  anthropic_api_key: Optional[str] = None,
60
+ cerebras_api_key: Optional[str] = None,
60
61
  organization: Optional[str] = None,
61
62
  project: Optional[str] = None,
62
63
  base_url: Union[str, httpx.URL, None] = None,
@@ -76,12 +77,16 @@ class MaitaiAsync:
76
77
  groq_api_key = api_key
77
78
  if not anthropic_api_key:
78
79
  anthropic_api_key = api_key
80
+ if not cerebras_api_key:
81
+ cerebras_api_key = api_key
79
82
  if openai_api_key:
80
83
  config.auth_keys.openai_api_key.key_value = openai_api_key
81
84
  if groq_api_key:
82
85
  config.auth_keys.groq_api_key.key_value = groq_api_key
83
86
  if anthropic_api_key:
84
87
  config.auth_keys.anthropic_api_key.key_value = anthropic_api_key
88
+ if cerebras_api_key:
89
+ config.auth_keys.cerebras_api_key.key_value = cerebras_api_key
85
90
  self._client = None
86
91
  if api_key or openai_api_key or os.environ.get("OPENAI_API_KEY"):
87
92
  self._client = openai.AsyncClient(
@@ -310,6 +315,7 @@ class AsyncCompletions:
310
315
  auth_keys=config.auth_keys,
311
316
  metadata=metadata,
312
317
  safe_mode=safe_mode,
318
+ extra_headers=extra_headers or {},
313
319
  )
314
320
  if self._client_params is not None:
315
321
  chat_request.client_params = self._client_params
@@ -1,3 +1,3 @@
1
- version = "1.1.35"
1
+ version = "1.1.36"
2
2
  if __name__ == "__main__":
3
3
  print(version)
@@ -0,0 +1,75 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # sources: billing.proto
3
+ # plugin: python-betterproto
4
+ # This file has been @generated
5
+
6
+ from dataclasses import dataclass
7
+ from typing import Dict
8
+
9
+ import betterproto
10
+
11
+
12
+ @dataclass(eq=False, repr=False)
13
+ class PaymentMethod(betterproto.Message):
14
+ id: int = betterproto.int64_field(1)
15
+ company_id: int = betterproto.int64_field(2)
16
+ stripe_id: str = betterproto.string_field(3)
17
+ status: str = betterproto.string_field(4)
18
+ date_created: int = betterproto.int64_field(5)
19
+ fingerprint: str = betterproto.string_field(6)
20
+ meta: "CardMeta" = betterproto.message_field(7)
21
+ is_default: bool = betterproto.bool_field(8)
22
+
23
+
24
+ @dataclass(eq=False, repr=False)
25
+ class ModelCost(betterproto.Message):
26
+ provider: str = betterproto.string_field(1)
27
+ model: str = betterproto.string_field(2)
28
+ prompt_cpm: float = betterproto.double_field(3)
29
+ completion_cpm: float = betterproto.double_field(4)
30
+
31
+
32
+ @dataclass(eq=False, repr=False)
33
+ class Card(betterproto.Message):
34
+ brand: str = betterproto.string_field(1)
35
+ last4: str = betterproto.string_field(2)
36
+ checks: Dict[str, str] = betterproto.map_field(
37
+ 3, betterproto.TYPE_STRING, betterproto.TYPE_STRING
38
+ )
39
+ country: str = betterproto.string_field(5)
40
+ funding: str = betterproto.string_field(6)
41
+ exp_year: int = betterproto.int32_field(7)
42
+ exp_month: int = betterproto.int32_field(8)
43
+ fingerprint: str = betterproto.string_field(9)
44
+ display_brand: str = betterproto.string_field(10)
45
+
46
+
47
+ @dataclass(eq=False, repr=False)
48
+ class BillingDetails(betterproto.Message):
49
+ name: str = betterproto.string_field(1)
50
+ email: str = betterproto.string_field(2)
51
+ phone: str = betterproto.string_field(3)
52
+ address: "Address" = betterproto.message_field(4)
53
+
54
+
55
+ @dataclass(eq=False, repr=False)
56
+ class Address(betterproto.Message):
57
+ city: str = betterproto.string_field(1)
58
+ line1: str = betterproto.string_field(2)
59
+ line2: str = betterproto.string_field(3)
60
+ state: str = betterproto.string_field(4)
61
+ postal_code: str = betterproto.string_field(5)
62
+ country: str = betterproto.string_field(6)
63
+
64
+
65
+ @dataclass(eq=False, repr=False)
66
+ class CardMeta(betterproto.Message):
67
+ id: str = betterproto.string_field(1)
68
+ customer: str = betterproto.string_field(2)
69
+ type: str = betterproto.string_field(3)
70
+ object: str = betterproto.string_field(4)
71
+ created: int = betterproto.int64_field(5)
72
+ livemode: bool = betterproto.bool_field(6)
73
+ allow_redisplay: str = betterproto.string_field(7)
74
+ billing_details: "BillingDetails" = betterproto.message_field(8)
75
+ card: "Card" = betterproto.message_field(9)
@@ -77,6 +77,9 @@ class ChatCompletionRequest(betterproto.Message):
77
77
  25, betterproto.TYPE_STRING, betterproto.TYPE_STRING
78
78
  )
79
79
  safe_mode: bool = betterproto.bool_field(26)
80
+ extra_headers: Dict[str, str] = betterproto.map_field(
81
+ 27, betterproto.TYPE_STRING, betterproto.TYPE_STRING
82
+ )
80
83
 
81
84
 
82
85
  @dataclass(eq=False, repr=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maitai-python
3
- Version: 1.1.35
3
+ Version: 1.1.36
4
4
  Summary: Maitai SDK for Python
5
5
  Home-page: https://docs.trymaitai.ai
6
6
  Author: Maitai
@@ -1,31 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # sources: billing.proto
3
- # plugin: python-betterproto
4
- # This file has been @generated
5
-
6
- from dataclasses import dataclass
7
- from typing import Dict
8
-
9
- import betterproto
10
-
11
-
12
- @dataclass(eq=False, repr=False)
13
- class PaymentMethod(betterproto.Message):
14
- id: int = betterproto.int64_field(1)
15
- company_id: int = betterproto.int64_field(2)
16
- stripe_id: str = betterproto.string_field(3)
17
- status: str = betterproto.string_field(4)
18
- date_created: int = betterproto.int64_field(5)
19
- fingerprint: str = betterproto.string_field(6)
20
- meta: Dict[str, str] = betterproto.map_field(
21
- 7, betterproto.TYPE_STRING, betterproto.TYPE_STRING
22
- )
23
- is_default: bool = betterproto.bool_field(8)
24
-
25
-
26
- @dataclass(eq=False, repr=False)
27
- class ModelCost(betterproto.Message):
28
- provider: str = betterproto.string_field(1)
29
- model: str = betterproto.string_field(2)
30
- prompt_cpm: float = betterproto.double_field(3)
31
- completion_cpm: float = betterproto.double_field(4)
File without changes
File without changes
File without changes