ragaai-catalyst 2.2.3b2__py3-none-any.whl → 2.2.3b4__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.
@@ -506,13 +506,6 @@ class Evaluation:
506
506
  response_text = parse_response()
507
507
  if response_text:
508
508
  df = pd.read_csv(io.StringIO(response_text))
509
-
510
- column_list = df.columns.to_list()
511
- # Remove unwanted columns
512
- column_list = [col for col in column_list if not col.startswith('_')]
513
- column_list = [col for col in column_list if '.' not in col]
514
- # Remove _claims_ columns
515
- column_list = [col for col in column_list if '_claims_' not in col]
516
- return df[column_list]
509
+ return df
517
510
  else:
518
511
  return pd.DataFrame()
@@ -48,9 +48,6 @@ class RagaAICatalyst:
48
48
  logger.error(
49
49
  "RAGAAI_CATALYST_ACCESS_KEY and RAGAAI_CATALYST_SECRET_KEY environment variables must be set"
50
50
  )
51
- raise ValueError(
52
- "RAGAAI_CATALYST_ACCESS_KEY and RAGAAI_CATALYST_SECRET_KEY environment variables must be set"
53
- )
54
51
 
55
52
  RagaAICatalyst.access_key, RagaAICatalyst.secret_key = (
56
53
  self._set_access_key_secret_key(access_key, secret_key)
@@ -79,9 +76,7 @@ class RagaAICatalyst:
79
76
  os.environ["RAGAAI_CATALYST_BASE_URL"] = RagaAICatalyst.BASE_URL
80
77
  RagaAICatalyst.get_token(force_refresh=True)
81
78
  except requests.exceptions.RequestException:
82
- raise ConnectionError(
83
- "The provided base_url is not accessible. Please re-check the base_url."
84
- )
79
+ logger.error("The provided base_url is not accessible. Please re-check the base_url.")
85
80
  else:
86
81
  # Get the token from the server
87
82
  RagaAICatalyst.get_token(force_refresh=True)
@@ -264,7 +259,7 @@ class RagaAICatalyst:
264
259
  if response.status_code == 400:
265
260
  token_response = response.json()
266
261
  if token_response.get("message") == "Please enter valid credentials":
267
- raise Exception(
262
+ logger.error(
268
263
  "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."
269
264
  )
270
265
 
@@ -379,13 +374,13 @@ class RagaAICatalyst:
379
374
  # Check if the project already exists
380
375
  existing_projects = self.list_projects()
381
376
  if project_name in existing_projects:
382
- raise ValueError(
377
+ logger.error(
383
378
  f"Project name '{project_name}' already exists. Please choose a different name."
384
379
  )
385
380
 
386
381
  usecase_list = self.project_use_cases()
387
382
  if usecase not in usecase_list:
388
- raise ValueError(f"Select a valid usecase from {usecase_list}")
383
+ logger.error(f"Select a valid usecase from {usecase_list}")
389
384
 
390
385
  json_data = {"name": project_name, "type": type, "usecase": usecase}
391
386
  headers = {
@@ -365,20 +365,23 @@ class Tracer(AgenticTracing):
365
365
  "output_cost_per_million_token": 2.40
366
366
  })
367
367
  """
368
- if not isinstance(cost_config, dict):
369
- logger.error("cost_config must be a dictionary")
370
-
371
- required_keys = {"model_name", "input_cost_per_million_token", "output_cost_per_million_token"}
372
- if not all(key in cost_config for key in required_keys):
373
- logger.error(f"cost_config must contain all required keys: {required_keys}")
374
-
375
- model_name = cost_config["model_name"]
376
- self.model_custom_cost[model_name] = {
377
- "input_cost_per_token": float(cost_config["input_cost_per_million_token"])/ 1000000,
378
- "output_cost_per_token": float(cost_config["output_cost_per_million_token"]) /1000000
379
- }
380
- self.dynamic_exporter.custom_model_cost = self.model_custom_cost
381
- logger.info(f"Updated custom model cost for {model_name}: {self.model_custom_cost[model_name]}")
368
+ logger.info("DEPRECATED: The set_model_cost method is deprecated and will be removed in a future version. Custom model costs can now be configured directly through the RagaAI Catalyst Platform")
369
+ print("DEPRECATED: The set_model_cost method is deprecated and will be removed in a future version. Custom model costs can now be configured directly through the RagaAI Catalyst Platform")
370
+ # if not isinstance(cost_config, dict):
371
+ # logger.error("cost_config must be a dictionary")
372
+
373
+ # required_keys = {"model_name", "input_cost_per_million_token", "output_cost_per_million_token"}
374
+ # if not all(key in cost_config for key in required_keys):
375
+ # logger.error(f"cost_config must contain all required keys: {required_keys}")
376
+
377
+ # model_name = cost_config["model_name"]
378
+ # self.model_custom_cost[model_name] = {
379
+ # "input_cost_per_token": float(cost_config["input_cost_per_million_token"])/ 1000000,
380
+ # "output_cost_per_token": float(cost_config["output_cost_per_million_token"]) /1000000
381
+ # }
382
+ # self.dynamic_exporter.custom_model_cost = self.model_custom_cost
383
+ # logger.info(f"Updated custom model cost for {model_name}: {self.model_custom_cost[model_name]}")
384
+ return None
382
385
 
383
386
 
384
387
  def register_masking_function(self, masking_func):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ragaai_catalyst
3
- Version: 2.2.3b2
3
+ Version: 2.2.3b4
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>, Tushar Kumar <tushar.kumar@raga.ai>, Rishabh Pandey <rishabh.pandey@raga.ai>, Jyotsana C G <jyotsana@raga.ai>
6
6
  Requires-Python: <=3.13.2,>=3.10
@@ -1,14 +1,14 @@
1
1
  ragaai_catalyst/__init__.py,sha256=2wfkucAbb3Bt_p2KHelkg9zBQp4yC4iZanltyieG18w,895
2
2
  ragaai_catalyst/_version.py,sha256=JKt9KaVNOMVeGs8ojO6LvIZr7ZkMzNN-gCcvryy4x8E,460
3
3
  ragaai_catalyst/dataset.py,sha256=H1zWw4nabiy8gsZ5msv6442VW5KBy4KTgxoqdH8r8J0,29368
4
- ragaai_catalyst/evaluation.py,sha256=tT86kBGE4HMMJoJO3kNZymFEdHv-Pyf0THplqOua0Xk,22940
4
+ ragaai_catalyst/evaluation.py,sha256=8P2zUMSMsQGmKdv7_dZ8F0iXWYddvappgKPN5oJXWuY,22568
5
5
  ragaai_catalyst/experiment.py,sha256=8yQo1phCHlpnJ-4CqCaIbLXg_1ZlAuLGI9kqGBl-OTE,18859
6
6
  ragaai_catalyst/guard_executor.py,sha256=VLqVO1gAEBaovoQQUjdNkivH1dXACFTsuXQ1nzAALQQ,14008
7
7
  ragaai_catalyst/guardrails_manager.py,sha256=_VrARJ1udmCF8TklNKy7XTQUaM8ATDhTOAGDonBkFro,14245
8
8
  ragaai_catalyst/internal_api_completion.py,sha256=DdICI5yfEudiOAIC8L4oxH0Qz7kX-BZCdo9IWsi2gNo,2965
9
9
  ragaai_catalyst/prompt_manager.py,sha256=W8ypramzOprrJ7-22d5vkBXIuIQ8v9XAzKDGxKsTK28,16550
10
10
  ragaai_catalyst/proxy_call.py,sha256=CHxldeceZUaLU-to_hs_Kf1z_b2vHMssLS_cOBedu78,5499
11
- ragaai_catalyst/ragaai_catalyst.py,sha256=H7nhKuPi3pJH3QzO2dWshZ6FXgyZ5YRNOcB7MkXPRes,25413
11
+ ragaai_catalyst/ragaai_catalyst.py,sha256=ZlcpOgJA9lVRi51YFy4dVfsxU0I79LJu0MnVI5BIL-c,25201
12
12
  ragaai_catalyst/redteaming_old.py,sha256=W2d89Ok8W-C8g7TBM3fDIFLof3q9FuYSr0jcryH2XQo,7097
13
13
  ragaai_catalyst/synthetic_data_generation.py,sha256=7lIWa3nwgW2-FlJrDaGxTN6OE4-dbbhLtKNOBQufhho,37952
14
14
  ragaai_catalyst/utils.py,sha256=TlhEFwLyRU690HvANbyoRycR3nQ67lxVUQoUOfTPYQ0,3772
@@ -31,7 +31,7 @@ ragaai_catalyst/tracers/distributed.py,sha256=CGPuOh4CsgEk428PPibieLaAG2Tt3BVygF
31
31
  ragaai_catalyst/tracers/langchain_callback.py,sha256=CB75zzG3-DkYTELj0vI1MOHQTY0MuQJfoHIXz9Cl8S8,34568
32
32
  ragaai_catalyst/tracers/llamaindex_callback.py,sha256=ZY0BJrrlz-P9Mg2dX-ZkVKG3gSvzwqBtk7JL_05MiYA,14028
33
33
  ragaai_catalyst/tracers/llamaindex_instrumentation.py,sha256=Ys_jLkvVqo12bKgXDmkp4TxJu9HkBATrFE8cIcTYxWw,14329
34
- ragaai_catalyst/tracers/tracer.py,sha256=NxGFTq6xnzb7opwcWNNYyyWtL9ausWUS0xe7p_ALbDk,42131
34
+ ragaai_catalyst/tracers/tracer.py,sha256=3iC6eeuWRv3VXsCoeQrPSnEnNkuSH-wzqe4nGUecu1M,42575
35
35
  ragaai_catalyst/tracers/upload_traces.py,sha256=w1clGGfdOMpStUJX40NAlxe6dcFdN4pwcezyII0bGYA,6994
36
36
  ragaai_catalyst/tracers/agentic_tracing/README.md,sha256=X4QwLb7-Jg7GQMIXj-SerZIgDETfw-7VgYlczOR8ZeQ,4508
37
37
  ragaai_catalyst/tracers/agentic_tracing/__init__.py,sha256=yf6SKvOPSpH-9LiKaoLKXwqj5sez8F_5wkOb91yp0oE,260
@@ -88,8 +88,8 @@ ragaai_catalyst/tracers/utils/rag_extraction_logic_final.py,sha256=3ygkRT__lLDRf
88
88
  ragaai_catalyst/tracers/utils/rag_trace_json_converter.py,sha256=54IEZO-YRjUAahV5nw8KClXqTF1LhfDry_TsZ4KGow4,20467
89
89
  ragaai_catalyst/tracers/utils/trace_json_converter.py,sha256=pds1wuTv9VtwEXiMg-TWBtrK5-XReTcWQbJzWU9t3wE,11497
90
90
  ragaai_catalyst/tracers/utils/utils.py,sha256=o-p9n2ZuophdrV0wrixu-BqRHCkovup_klc3mS8mU8g,2374
91
- ragaai_catalyst-2.2.3b2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
92
- ragaai_catalyst-2.2.3b2.dist-info/METADATA,sha256=X2A7b0uKHOIub0AjPK6iciEhEn2fI-WDc-k9CwtJ1CY,17679
93
- ragaai_catalyst-2.2.3b2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
94
- ragaai_catalyst-2.2.3b2.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
95
- ragaai_catalyst-2.2.3b2.dist-info/RECORD,,
91
+ ragaai_catalyst-2.2.3b4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
92
+ ragaai_catalyst-2.2.3b4.dist-info/METADATA,sha256=ZdrndNumPtG0XijL_JgYJy5KncMlJfqAyBY4Kuf-fdg,17679
93
+ ragaai_catalyst-2.2.3b4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
94
+ ragaai_catalyst-2.2.3b4.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
95
+ ragaai_catalyst-2.2.3b4.dist-info/RECORD,,