mira-network 0.1.4__py3-none-any.whl → 0.1.5__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.
- mira_network/client.py +1 -1
- mira_network/sync_client.py +1 -1
- {mira_network-0.1.4.dist-info → mira_network-0.1.5.dist-info}/METADATA +13 -5
- mira_network-0.1.5.dist-info/RECORD +8 -0
- mira_network-0.1.4.dist-info/RECORD +0 -8
- {mira_network-0.1.4.dist-info → mira_network-0.1.5.dist-info}/WHEEL +0 -0
- {mira_network-0.1.4.dist-info → mira_network-0.1.5.dist-info}/entry_points.txt +0 -0
mira_network/client.py
CHANGED
mira_network/sync_client.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: mira-network
|
3
|
-
Version: 0.1.
|
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(
|
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(
|
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
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
mira_network-0.1.5.dist-info/METADATA,sha256=Q9jRYiP-Oo6ecT8iBgCIxi4pT-4nbHwuEP-8vgZ2OEc,5353
|
2
|
+
mira_network-0.1.5.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
+
mira_network-0.1.5.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
|
+
mira_network/__init__.py,sha256=82x6bhP9_ZhHaBkW-O10F4ADipp1crGQzTaxQ878buA,272
|
5
|
+
mira_network/client.py,sha256=HEqj1G1VfDZxZ3Kh2YPNBeUMlB5Pb56HBSvh80Wde2c,5738
|
6
|
+
mira_network/models.py,sha256=aEJiDHEDFIAQMB-C8ZFY5ruRNGJ-U2Cz9vS5nF7GqVg,1805
|
7
|
+
mira_network/sync_client.py,sha256=vAiQG0SDHO9aROklnPqr0m-AsPIyL8wNfA0L7h5EhPg,3399
|
8
|
+
mira_network-0.1.5.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
mira_network-0.1.4.dist-info/METADATA,sha256=l_M7hizI6V3qfd94wTFRb9tViHhN62_7Ze4QOGy6i_Y,5026
|
2
|
-
mira_network-0.1.4.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
|
3
|
-
mira_network-0.1.4.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
|
-
mira_network/__init__.py,sha256=82x6bhP9_ZhHaBkW-O10F4ADipp1crGQzTaxQ878buA,272
|
5
|
-
mira_network/client.py,sha256=_Fj4g20CSyzqHnDHhn43TunFLLub_n2Ix3cBAwa7spU,5739
|
6
|
-
mira_network/models.py,sha256=aEJiDHEDFIAQMB-C8ZFY5ruRNGJ-U2Cz9vS5nF7GqVg,1805
|
7
|
-
mira_network/sync_client.py,sha256=0f_oakroMp-OYC-WRvNRcWnQW9YtUdQRdVxKNeNbMUA,3400
|
8
|
-
mira_network-0.1.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|