llumo 0.2.5__py3-none-any.whl → 0.2.7__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.
llumo/client.py CHANGED
@@ -1,16 +1,18 @@
1
1
  import requests
2
2
 
3
- from .exceptions import LlumoAIError
3
+
4
4
  import time
5
5
  import re
6
6
  import json
7
7
  import uuid
8
+
8
9
  import os
9
10
  import itertools
10
11
  import pandas as pd
11
12
  from typing import List, Dict
12
13
  from .models import AVAILABLEMODELS, getProviderFromModel
13
14
  from .execution import ModelExecutor
15
+ from .exceptions import LlumoAIError
14
16
  from .helpingFuntions import *
15
17
  from .sockets import LlumoSocketClient
16
18
  from .functionCalling import LlumoAgentExecutor
@@ -29,7 +31,7 @@ class LlumoClient:
29
31
  self.socket = LlumoSocketClient(socketUrl)
30
32
  self.processMapping = {}
31
33
 
32
- def validateApiKey(self, evalName=""):
34
+ def validateApiKey(self, evalName=" "):
33
35
  headers = {
34
36
  "Authorization": f"Bearer {self.apiKey}",
35
37
  "Content-Type": "application/json",
llumo/helpingFuntions.py CHANGED
@@ -106,23 +106,28 @@ def checkUserHits(
106
106
  if subscriptionEndDate and current_date > subscriptionEndDate:
107
107
  return {"success": False, "message": "Subscription expired. Access denied."}
108
108
 
109
- if remainingHits <= 0 or remainingHits < datasetLength:
110
- headers = {
111
- "Authorization": f"Bearer {base64.b64encode(workspaceID.encode()).decode()}",
112
- "Content-Type": "application/json",
113
- }
114
- reqBody = {"unitsToSet": 1}
115
- responseBody = requests.post(
116
- url=subscriptionUrl, json=reqBody, headers=headers
117
- )
118
- response = json.loads(responseBody.text)
119
-
120
- proceed = response.get("execution", "")
121
- print(proceed)
122
-
123
- if proceed:
124
- return {"success": True, "message": "Hits added and access granted."}
125
109
 
110
+
111
+ if remainingHits <= 0 or remainingHits < datasetLength:
112
+ if workspaceID:
113
+ workspaceID=str(workspaceID)
114
+ headers = {
115
+ "Authorization": f"Bearer {base64.b64encode(workspaceID.encode()).decode()}",
116
+ "Content-Type": "application/json",
117
+ }
118
+ reqBody = {"unitsToSet": 1}
119
+ responseBody = requests.post(
120
+ url=subscriptionUrl, json=reqBody, headers=headers
121
+ )
122
+ response = json.loads(responseBody.text)
123
+
124
+ proceed = response.get("execution", "")
125
+ print(proceed)
126
+
127
+ if proceed:
128
+ return {"success": True, "message": "Hits added and access granted."}
129
+ else:
130
+ return {"success": False, "message": "Workspace ID is required for subscription."}
126
131
  return {"success": True, "message": "Access granted."}
127
132
 
128
133
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llumo
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Python SDK for interacting with the Llumo ai API.
5
5
  Home-page: https://www.llumo.ai/
6
6
  Author: Llumo
@@ -1,13 +1,13 @@
1
1
  llumo/__init__.py,sha256=O04b4yW1BnOvcHzxWFddAKhtdBEhBNhLdb6xgnpHH_Q,205
2
- llumo/client.py,sha256=aCYeUrmEssSqydA_p3nokJ9MkspgitJ0HTmzL7SpkQw,35540
2
+ llumo/client.py,sha256=8Ne-Dkr0ftT9f1KfWp72bea4ae2RrVJ3FvM4Xs7AFrM,35543
3
3
  llumo/exceptions.py,sha256=iCj7HhtO_ckC2EaVBdXbAudNpuMDsYmmMEV5lwynZ-E,1854
4
4
  llumo/execution.py,sha256=x88wQV8eL99wNN5YtjFaAMCIfN1PdfQVlAZQb4vzgQ0,1413
5
5
  llumo/functionCalling.py,sha256=D5jYapu1rIvdIJNUYPYMTyhQ1H-6nkwoOLMi6eekfUE,7241
6
- llumo/helpingFuntions.py,sha256=G_pqLhYNH3bZ47gA--w6YFNvB443xkrbh8CeQfYxazk,8839
6
+ llumo/helpingFuntions.py,sha256=lG_d3lQgJj6pI7v1YdLqdPojrLCNwybKz29zXrGaL5k,9090
7
7
  llumo/models.py,sha256=YH-qAMnShmUpmKE2LQAzQdpRsaXkFSlOqMxHwU4zBUI,1560
8
8
  llumo/sockets.py,sha256=Qxxqtx3Hg07HLhA4QfcipK1ChiOYhHZBu02iA6MfYlQ,5579
9
- llumo-0.2.5.dist-info/licenses/LICENSE,sha256=tF9yAcfPV9xGT3ViWmC8hPvOo8BEk4ZICbUfcEo8Dlk,182
10
- llumo-0.2.5.dist-info/METADATA,sha256=luOkLN_md2iGVCEBTGs2jZybFrko_XKvmF_Ny04txjg,1490
11
- llumo-0.2.5.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
12
- llumo-0.2.5.dist-info/top_level.txt,sha256=d5zUTMI99llPtLRB8rtSrqELm_bOqX-bNC5IcwlDk88,6
13
- llumo-0.2.5.dist-info/RECORD,,
9
+ llumo-0.2.7.dist-info/licenses/LICENSE,sha256=tF9yAcfPV9xGT3ViWmC8hPvOo8BEk4ZICbUfcEo8Dlk,182
10
+ llumo-0.2.7.dist-info/METADATA,sha256=VDeZQ64GPuvyozUR0sui4syLE98RiRm3gUzeLmF8cZg,1490
11
+ llumo-0.2.7.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
12
+ llumo-0.2.7.dist-info/top_level.txt,sha256=d5zUTMI99llPtLRB8rtSrqELm_bOqX-bNC5IcwlDk88,6
13
+ llumo-0.2.7.dist-info/RECORD,,
File without changes