mira-network 0.1.4__tar.gz → 0.1.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mira-network
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Python SDK for Mira Network API
5
5
  Author-Email: sarim2000 <sarimbleedblue@gmail.com>
6
6
  License: MIT
@@ -31,7 +31,7 @@ from mira_network.sync_client import MiraSyncClient
31
31
  from mira_network.models import AiRequest, Message
32
32
 
33
33
  # Using context manager (recommended)
34
- with MiraSyncClient(api_token="your-api-token") as client:
34
+ with MiraSyncClient(api_token="your-api-token") as client: # base_url defaults to https://apis.mira.network/
35
35
  # Example 1: Non-streaming response
36
36
  request = AiRequest(
37
37
  messages=[
@@ -64,13 +64,15 @@ from mira_network.models import AiRequest, Message
64
64
 
65
65
  async def main():
66
66
  # Using async context manager (recommended)
67
- async with MiraClient(api_token="your-api-token") as client:
67
+ async with MiraClient(api_token="your-api-token") as client: # base_url defaults to https://apis.mira.network/
68
68
  # Example 1: Non-streaming response
69
69
  request = AiRequest(
70
70
  messages=[
71
71
  Message(role="system", content="You are a helpful assistant."),
72
72
  Message(role="user", content="Hello!")
73
73
  ],
74
+ model="gpt-4o",
75
+ model_provider=None,
74
76
  stream=False
75
77
  )
76
78
  response = await client.generate(request)
@@ -103,11 +105,17 @@ Both clients support context managers for proper resource cleanup:
103
105
 
104
106
  ```python
105
107
  # Synchronous
106
- with MiraSyncClient(api_token="your-api-token") as client:
108
+ with MiraSyncClient(
109
+ api_token="your-api-token",
110
+ base_url="https://apis.mira.network/" # Optional, this is the default
111
+ ) as client:
107
112
  # Your sync code here
108
113
 
109
114
  # Asynchronous
110
- async with MiraClient(api_token="your-api-token") as client:
115
+ async with MiraClient(
116
+ api_token="your-api-token",
117
+ base_url="https://apis.mira.network/" # Optional, this is the default
118
+ ) as client:
111
119
  # Your async code here
112
120
  ```
113
121
 
@@ -17,7 +17,7 @@ from mira_network.sync_client import MiraSyncClient
17
17
  from mira_network.models import AiRequest, Message
18
18
 
19
19
  # Using context manager (recommended)
20
- with MiraSyncClient(api_token="your-api-token") as client:
20
+ with MiraSyncClient(api_token="your-api-token") as client: # base_url defaults to https://apis.mira.network/
21
21
  # Example 1: Non-streaming response
22
22
  request = AiRequest(
23
23
  messages=[
@@ -50,13 +50,15 @@ from mira_network.models import AiRequest, Message
50
50
 
51
51
  async def main():
52
52
  # Using async context manager (recommended)
53
- async with MiraClient(api_token="your-api-token") as client:
53
+ async with MiraClient(api_token="your-api-token") as client: # base_url defaults to https://apis.mira.network/
54
54
  # Example 1: Non-streaming response
55
55
  request = AiRequest(
56
56
  messages=[
57
57
  Message(role="system", content="You are a helpful assistant."),
58
58
  Message(role="user", content="Hello!")
59
59
  ],
60
+ model="gpt-4o",
61
+ model_provider=None,
60
62
  stream=False
61
63
  )
62
64
  response = await client.generate(request)
@@ -89,11 +91,17 @@ Both clients support context managers for proper resource cleanup:
89
91
 
90
92
  ```python
91
93
  # Synchronous
92
- with MiraSyncClient(api_token="your-api-token") as client:
94
+ with MiraSyncClient(
95
+ api_token="your-api-token",
96
+ base_url="https://apis.mira.network/" # Optional, this is the default
97
+ ) as client:
93
98
  # Your sync code here
94
99
 
95
100
  # Asynchronous
96
- async with MiraClient(api_token="your-api-token") as client:
101
+ async with MiraClient(
102
+ api_token="your-api-token",
103
+ base_url="https://apis.mira.network/" # Optional, this is the default
104
+ ) as client:
97
105
  # Your async code here
98
106
  ```
99
107
 
@@ -13,7 +13,7 @@ description = "Python SDK for Mira Network API"
13
13
  name = "mira-network"
14
14
  readme = "README.md"
15
15
  requires-python = "==3.10.*"
16
- version = "0.1.4"
16
+ version = "0.1.5"
17
17
 
18
18
  [project.license]
19
19
  text = "MIT"
@@ -10,7 +10,7 @@ class MiraClient:
10
10
 
11
11
  def __init__(
12
12
  self,
13
- base_url: str = "https://apis.mira.network/",
13
+ base_url: str = "https://apis.mira.network",
14
14
  api_token: Optional[str] = None,
15
15
  ):
16
16
  """Initialize Mira client.
@@ -9,7 +9,7 @@ from .models import (
9
9
  class MiraSyncClient:
10
10
  def __init__(
11
11
  self,
12
- base_url: str = "https://apis.mira.network/",
12
+ base_url: str = "https://apis.mira.network",
13
13
  api_token: Optional[str] = None,
14
14
  ):
15
15
  """Initialize Mira synchronous client.