opengradient 0.5.11__py3-none-any.whl → 0.5.13__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.
- opengradient/client.py +4 -4
- opengradient/x402_auth.py +4 -3
- {opengradient-0.5.11.dist-info → opengradient-0.5.13.dist-info}/METADATA +1 -1
- {opengradient-0.5.11.dist-info → opengradient-0.5.13.dist-info}/RECORD +8 -8
- {opengradient-0.5.11.dist-info → opengradient-0.5.13.dist-info}/WHEEL +0 -0
- {opengradient-0.5.11.dist-info → opengradient-0.5.13.dist-info}/entry_points.txt +0 -0
- {opengradient-0.5.11.dist-info → opengradient-0.5.13.dist-info}/licenses/LICENSE +0 -0
- {opengradient-0.5.11.dist-info → opengradient-0.5.13.dist-info}/top_level.txt +0 -0
opengradient/client.py
CHANGED
|
@@ -512,8 +512,8 @@ class Client:
|
|
|
512
512
|
# Check if this is a local model or external
|
|
513
513
|
# TODO (Kyle): separate TEE and Vanilla completion requests
|
|
514
514
|
if inference_mode == LlmInferenceMode.TEE:
|
|
515
|
-
if model_cid not in TEE_LLM:
|
|
516
|
-
|
|
515
|
+
if model_cid not in [llm.value for llm in TEE_LLM]:
|
|
516
|
+
raise OpenGradientError("That model CID is not supported yet for TEE inference")
|
|
517
517
|
|
|
518
518
|
return self._external_llm_completion(
|
|
519
519
|
model=model_cid.split("/")[1],
|
|
@@ -726,8 +726,8 @@ class Client:
|
|
|
726
726
|
# Check if this is a local model or external
|
|
727
727
|
# TODO (Kyle): separate TEE and Vanilla completion requests
|
|
728
728
|
if inference_mode == LlmInferenceMode.TEE:
|
|
729
|
-
if model_cid not in TEE_LLM:
|
|
730
|
-
|
|
729
|
+
if model_cid not in [llm.value for llm in TEE_LLM]:
|
|
730
|
+
raise OpenGradientError("That model CID is not supported yet for TEE inference")
|
|
731
731
|
|
|
732
732
|
if stream:
|
|
733
733
|
# Use threading bridge for true sync streaming
|
opengradient/x402_auth.py
CHANGED
|
@@ -43,6 +43,7 @@ class X402Auth(httpx.Auth):
|
|
|
43
43
|
]
|
|
44
44
|
] = None,
|
|
45
45
|
network_filter: typing.Optional[str] = None,
|
|
46
|
+
scheme_filter: typing.Optional[str] = None,
|
|
46
47
|
):
|
|
47
48
|
"""
|
|
48
49
|
Initialize X402Auth with an Ethereum account for signing payments.
|
|
@@ -50,15 +51,14 @@ class X402Auth(httpx.Auth):
|
|
|
50
51
|
Args:
|
|
51
52
|
account: eth_account LocalAccount instance for signing payments
|
|
52
53
|
max_value: Optional maximum allowed payment amount in base units
|
|
53
|
-
network_filter: Optional network filter for selecting payment requirements
|
|
54
|
-
scheme_filter: Optional scheme filter for selecting payment requirements
|
|
55
54
|
"""
|
|
55
|
+
self.network_filter = network_filter
|
|
56
|
+
self.scheme_filter = scheme_filter
|
|
56
57
|
self.x402_client = x402Client(
|
|
57
58
|
account,
|
|
58
59
|
max_value=max_value,
|
|
59
60
|
payment_requirements_selector=payment_requirements_selector, # type: ignore
|
|
60
61
|
)
|
|
61
|
-
self.network_filter = network_filter
|
|
62
62
|
|
|
63
63
|
async def async_auth_flow(
|
|
64
64
|
self, request: httpx.Request
|
|
@@ -84,6 +84,7 @@ class X402Auth(httpx.Auth):
|
|
|
84
84
|
selected_requirements = self.x402_client.select_payment_requirements(
|
|
85
85
|
payment_response.accepts,
|
|
86
86
|
self.network_filter,
|
|
87
|
+
self.scheme_filter,
|
|
87
88
|
)
|
|
88
89
|
|
|
89
90
|
payment_header = self.x402_client.create_payment_header(
|
|
@@ -2,12 +2,12 @@ opengradient/__init__.py,sha256=hRGex2VGwAQ-lqBNphW93D4R3wPHQpQrTkwgGLe2MoA,1025
|
|
|
2
2
|
opengradient/account.py,sha256=5wrYpws_1lozjOFjLCTHtxgoxK-LmObDAaVy9eDcJY4,1145
|
|
3
3
|
opengradient/alpha.py,sha256=WAtL1GGbEpoeLO89rOMd8-YAgAFJYM1UJlICm6YGsPs,15195
|
|
4
4
|
opengradient/cli.py,sha256=pfgyLfD1MIDifKmGLFsJqBlgvqIcnsIh3zzg7PaIeH4,33670
|
|
5
|
-
opengradient/client.py,sha256=
|
|
5
|
+
opengradient/client.py,sha256=yGQ7JngirqPjS0BDOrIeSGVYLrDQpL59tkIz9cL61Jk,65333
|
|
6
6
|
opengradient/defaults.py,sha256=8faLPwvp_BQdErY_SEjBzvmGVuOBdZ2zKcoryD8SCXk,797
|
|
7
7
|
opengradient/exceptions.py,sha256=88tfegboGtlehQcwhxsl6ZzhLJWZWlkf_bkHTiCtXpo,3391
|
|
8
8
|
opengradient/types.py,sha256=bADakUM6WwdMORGC5HvQvWCezNwIlVc7l0zodPapbhQ,14622
|
|
9
9
|
opengradient/utils.py,sha256=ZUq4OBIml2vsC0tRqus4Zwb_e3g4woo00apByrafuVw,8058
|
|
10
|
-
opengradient/x402_auth.py,sha256=
|
|
10
|
+
opengradient/x402_auth.py,sha256=DDY8DPt1VlWXYJBrwsQ9vRTkX_nW0kHPw0M3IFuG1lM,3272
|
|
11
11
|
opengradient/abi/InferencePrecompile.abi,sha256=reepTHg6Q01UrFP0Gexc-JayplsvOLPfG7jrEZ-cV28,10197
|
|
12
12
|
opengradient/abi/PriceHistoryInference.abi,sha256=ZB3fZdx1kaFlp2wt1vTbTZZG1k8HPvmNtkG5Q8Bnajw,5098
|
|
13
13
|
opengradient/abi/WorkflowScheduler.abi,sha256=yEGs76qO4S1z980KL5hBdfyXiJ6k-kERcB1O_o73AEU,416
|
|
@@ -29,9 +29,9 @@ opengradient/workflow_models/constants.py,sha256=viIkb_LGcfVprqQNaA80gBTj6cfYam0
|
|
|
29
29
|
opengradient/workflow_models/types.py,sha256=Z22hF6c8Y4D2GlzVEIBODGwsqSjSrQvUcpZ7R-mIJdI,409
|
|
30
30
|
opengradient/workflow_models/utils.py,sha256=aL2-Hp5J5qlJft6-wx4GnZNOXZ1vjYaTF1uEgYavWdI,1509
|
|
31
31
|
opengradient/workflow_models/workflow_models.py,sha256=d4C_gs39DAfy4cdY9Ee6GMXpPfzwvKFpmxzK1A7LNgU,3900
|
|
32
|
-
opengradient-0.5.
|
|
33
|
-
opengradient-0.5.
|
|
34
|
-
opengradient-0.5.
|
|
35
|
-
opengradient-0.5.
|
|
36
|
-
opengradient-0.5.
|
|
37
|
-
opengradient-0.5.
|
|
32
|
+
opengradient-0.5.13.dist-info/licenses/LICENSE,sha256=xEcvQ3AxZOtDkrqkys2Mm6Y9diEnaSeQRKvxi-JGnNA,1069
|
|
33
|
+
opengradient-0.5.13.dist-info/METADATA,sha256=kpXm-b7HB09GDchtUHwHNQ8OrNUDHQhUCHvlp07ENDw,5437
|
|
34
|
+
opengradient-0.5.13.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
35
|
+
opengradient-0.5.13.dist-info/entry_points.txt,sha256=yUKTaJx8RXnybkob0J62wVBiCp_1agVbgw9uzsmaeJc,54
|
|
36
|
+
opengradient-0.5.13.dist-info/top_level.txt,sha256=oC1zimVLa2Yi1LQz8c7x-0IQm92milb5ax8gHBHwDqU,13
|
|
37
|
+
opengradient-0.5.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|