ragaai-catalyst 1.0.8b4__py3-none-any.whl → 1.0.8.2__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.
- ragaai_catalyst/ragaai_catalyst.py +14 -12
- {ragaai_catalyst-1.0.8b4.dist-info → ragaai_catalyst-1.0.8.2.dist-info}/METADATA +1 -1
- {ragaai_catalyst-1.0.8b4.dist-info → ragaai_catalyst-1.0.8.2.dist-info}/RECORD +5 -5
- {ragaai_catalyst-1.0.8b4.dist-info → ragaai_catalyst-1.0.8.2.dist-info}/WHEEL +1 -1
- {ragaai_catalyst-1.0.8b4.dist-info → ragaai_catalyst-1.0.8.2.dist-info}/top_level.txt +0 -0
@@ -54,16 +54,21 @@ class RagaAICatalyst:
|
|
54
54
|
|
55
55
|
self.api_keys = api_keys or {}
|
56
56
|
|
57
|
-
if self.api_keys:
|
58
|
-
self._upload_keys()
|
59
|
-
|
60
57
|
if base_url:
|
61
58
|
RagaAICatalyst.BASE_URL = base_url
|
62
59
|
try:
|
63
|
-
self.get_token()
|
64
60
|
os.environ["RAGAAI_CATALYST_BASE_URL"] = base_url
|
65
61
|
except requests.exceptions.RequestException:
|
66
|
-
raise ConnectionError(
|
62
|
+
raise ConnectionError(
|
63
|
+
"The provided base_url is not accessible. Please re-check the base_url."
|
64
|
+
)
|
65
|
+
|
66
|
+
# Get the token from the server
|
67
|
+
self.get_token()
|
68
|
+
|
69
|
+
# Set the API keys, if available
|
70
|
+
if self.api_keys:
|
71
|
+
self._upload_keys()
|
67
72
|
|
68
73
|
def _set_access_key_secret_key(self, access_key, secret_key):
|
69
74
|
os.environ["RAGAAI_CATALYST_ACCESS_KEY"] = access_key
|
@@ -145,10 +150,7 @@ class RagaAICatalyst:
|
|
145
150
|
return None
|
146
151
|
|
147
152
|
headers = {"Content-Type": "application/json"}
|
148
|
-
json_data = {
|
149
|
-
"accessKey": access_key,
|
150
|
-
"secretKey": secret_key
|
151
|
-
}
|
153
|
+
json_data = {"accessKey": access_key, "secretKey": secret_key}
|
152
154
|
|
153
155
|
response = requests.post(
|
154
156
|
f"{ RagaAICatalyst.BASE_URL}/token",
|
@@ -161,7 +163,9 @@ class RagaAICatalyst:
|
|
161
163
|
if response.status_code == 400:
|
162
164
|
token_response = response.json()
|
163
165
|
if token_response.get("message") == "Please enter valid credentials":
|
164
|
-
raise Exception(
|
166
|
+
raise Exception(
|
167
|
+
"Authentication failed. Invalid credentials provided. Please check your Access key and Secret key. \nTo view or create new keys, navigate to Settings -> Authenticate in the RagaAI Catalyst dashboard."
|
168
|
+
)
|
165
169
|
|
166
170
|
response.raise_for_status()
|
167
171
|
|
@@ -183,7 +187,6 @@ class RagaAICatalyst:
|
|
183
187
|
logger.error("Token(s) not set")
|
184
188
|
return None
|
185
189
|
|
186
|
-
|
187
190
|
def create_project(self, project_name, type="llm", description=""):
|
188
191
|
"""
|
189
192
|
Creates a project with the given project_name, type, and description.
|
@@ -253,7 +256,6 @@ class RagaAICatalyst:
|
|
253
256
|
"Unexpected error while creating project: %s", str(general_err1)
|
254
257
|
)
|
255
258
|
return "An unexpected error occurred while creating the project"
|
256
|
-
|
257
259
|
|
258
260
|
def list_projects(self, num_projects=100):
|
259
261
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ragaai_catalyst
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.8.2
|
4
4
|
Summary: RAGA AI CATALYST
|
5
5
|
Author-email: Kiran Scaria <kiran.scaria@raga.ai>, Kedar Gaikwad <kedar.gaikwad@raga.ai>, Dushyant Mahajan <dushyant.mahajan@raga.ai>, Siddhartha Kosti <siddhartha.kosti@raga.ai>, Ritika Goel <ritika.goel@raga.ai>, Vijay Chaurasia <vijay.chaurasia@raga.ai>
|
6
6
|
Requires-Python: >=3.9
|
@@ -3,7 +3,7 @@ ragaai_catalyst/_version.py,sha256=JKt9KaVNOMVeGs8ojO6LvIZr7ZkMzNN-gCcvryy4x8E,4
|
|
3
3
|
ragaai_catalyst/dataset.py,sha256=xEun-MqTgT0JGyGB2t0BwwC6M7t1aUT7x5X12C-_4pI,7644
|
4
4
|
ragaai_catalyst/experiment.py,sha256=c0l72fNULb4KZVcXwehZKdXb116JRyd0Y3hU3CVf8Fs,18999
|
5
5
|
ragaai_catalyst/prompt_manager.py,sha256=3jEcgS0JRZzjHww_ityOkq9SMvi7DQ75PlKu-17dXW4,14729
|
6
|
-
ragaai_catalyst/ragaai_catalyst.py,sha256=
|
6
|
+
ragaai_catalyst/ragaai_catalyst.py,sha256=hTkGU9-05TIRuePJ5I0-FKhr_WzlNtGILPCzHKs9tZw,16335
|
7
7
|
ragaai_catalyst/utils.py,sha256=TlhEFwLyRU690HvANbyoRycR3nQ67lxVUQoUOfTPYQ0,3772
|
8
8
|
ragaai_catalyst/tracers/__init__.py,sha256=NppmJhD3sQ5R1q6teaZLS7rULj08Gb6JT8XiPRIe_B0,49
|
9
9
|
ragaai_catalyst/tracers/tracer.py,sha256=LZQNKQF6hRfzxDu_Ljs2HBxQinjihKQoH189gIsO4w4,9171
|
@@ -16,7 +16,7 @@ ragaai_catalyst/tracers/instrumentators/llamaindex.py,sha256=SMrRlR4xM7k9HK43hak
|
|
16
16
|
ragaai_catalyst/tracers/instrumentators/openai.py,sha256=14R4KW9wQCR1xysLfsP_nxS7cqXrTPoD8En4MBAaZUU,379
|
17
17
|
ragaai_catalyst/tracers/utils/__init__.py,sha256=KeMaZtYaTojilpLv65qH08QmpYclfpacDA0U3wg6Ybw,64
|
18
18
|
ragaai_catalyst/tracers/utils/utils.py,sha256=ViygfJ7vZ7U0CTSA1lbxVloHp4NSlmfDzBRNCJuMhis,2374
|
19
|
-
ragaai_catalyst-1.0.
|
20
|
-
ragaai_catalyst-1.0.
|
21
|
-
ragaai_catalyst-1.0.
|
22
|
-
ragaai_catalyst-1.0.
|
19
|
+
ragaai_catalyst-1.0.8.2.dist-info/METADATA,sha256=GvMbIUGcMNHVAJa7VAX6GQFicnnT55_0xB906EsdkE0,6499
|
20
|
+
ragaai_catalyst-1.0.8.2.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
21
|
+
ragaai_catalyst-1.0.8.2.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
|
22
|
+
ragaai_catalyst-1.0.8.2.dist-info/RECORD,,
|
File without changes
|