ragaai-catalyst 2.1.5b9__py3-none-any.whl → 2.1.5b11__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/tracers/langchain_callback.py +25 -7
- {ragaai_catalyst-2.1.5b9.dist-info → ragaai_catalyst-2.1.5b11.dist-info}/METADATA +1 -1
- {ragaai_catalyst-2.1.5b9.dist-info → ragaai_catalyst-2.1.5b11.dist-info}/RECORD +6 -6
- {ragaai_catalyst-2.1.5b9.dist-info → ragaai_catalyst-2.1.5b11.dist-info}/LICENSE +0 -0
- {ragaai_catalyst-2.1.5b9.dist-info → ragaai_catalyst-2.1.5b11.dist-info}/WHEEL +0 -0
- {ragaai_catalyst-2.1.5b9.dist-info → ragaai_catalyst-2.1.5b11.dist-info}/top_level.txt +0 -0
@@ -177,9 +177,10 @@ class LangchainTracer(BaseCallbackHandler):
|
|
177
177
|
# Store model name if available
|
178
178
|
if component_name in ["OpenAI", "ChatOpenAI_LangchainOpenAI", "ChatOpenAI_ChatModels",
|
179
179
|
"ChatVertexAI", "VertexAI", "ChatGoogleGenerativeAI", "ChatAnthropic",
|
180
|
-
"ChatLiteLLM"]:
|
180
|
+
"ChatLiteLLM", "ChatBedrock", "AzureChatOpenAI"]:
|
181
181
|
instance = args[0] if args else None
|
182
|
-
model_name = kwargs.get('model_name') or kwargs.get('model')
|
182
|
+
model_name = kwargs.get('model_name') or kwargs.get('model') or kwargs.get('model_id')
|
183
|
+
|
183
184
|
if instance and model_name:
|
184
185
|
self.model_names[id(instance)] = model_name
|
185
186
|
|
@@ -218,13 +219,24 @@ class LangchainTracer(BaseCallbackHandler):
|
|
218
219
|
components_to_patch["OpenAI"] = (OpenAI, "__init__")
|
219
220
|
except ImportError:
|
220
221
|
logger.debug("OpenAI not available for patching")
|
222
|
+
|
223
|
+
try:
|
224
|
+
from langchain_aws import ChatBedrock
|
225
|
+
components_to_patch["ChatBedrock"] = (ChatBedrock, "__init__")
|
226
|
+
except ImportError:
|
227
|
+
logger.debug("ChatBedrock not available for patching")
|
221
228
|
|
222
229
|
try:
|
223
|
-
from langchain_google_vertexai import ChatVertexAI
|
230
|
+
from langchain_google_vertexai import ChatVertexAI
|
224
231
|
components_to_patch["ChatVertexAI"] = (ChatVertexAI, "__init__")
|
232
|
+
except ImportError:
|
233
|
+
logger.debug("ChatVertexAI not available for patching")
|
234
|
+
|
235
|
+
try:
|
236
|
+
from langchain_google_vertexai import VertexAI
|
225
237
|
components_to_patch["VertexAI"] = (VertexAI, "__init__")
|
226
238
|
except ImportError:
|
227
|
-
logger.debug("
|
239
|
+
logger.debug("VertexAI not available for patching")
|
228
240
|
|
229
241
|
try:
|
230
242
|
from langchain_google_genai import ChatGoogleGenerativeAI
|
@@ -248,13 +260,19 @@ class LangchainTracer(BaseCallbackHandler):
|
|
248
260
|
from langchain_openai import ChatOpenAI as ChatOpenAI_LangchainOpenAI
|
249
261
|
components_to_patch["ChatOpenAI_LangchainOpenAI"] = (ChatOpenAI_LangchainOpenAI, "__init__")
|
250
262
|
except ImportError:
|
251
|
-
logger.debug("
|
263
|
+
logger.debug("ChatOpenAI (from langchain_openai) not available for patching")
|
264
|
+
|
265
|
+
try:
|
266
|
+
from langchain_openai import AzureChatOpenAI
|
267
|
+
components_to_patch["AzureChatOpenAI"] = (AzureChatOpenAI, "__init__")
|
268
|
+
except ImportError:
|
269
|
+
logger.debug("AzureChatOpenAI (from langchain_openai) not available for patching")
|
252
270
|
|
253
271
|
try:
|
254
272
|
from langchain.chat_models import ChatOpenAI as ChatOpenAI_ChatModels
|
255
273
|
components_to_patch["ChatOpenAI_ChatModels"] = (ChatOpenAI_ChatModels, "__init__")
|
256
274
|
except ImportError:
|
257
|
-
logger.debug("
|
275
|
+
logger.debug("ChatOpenAI (from langchain.chat_models) not available for patching")
|
258
276
|
|
259
277
|
try:
|
260
278
|
from langchain.chains import create_retrieval_chain, RetrievalQA
|
@@ -509,7 +527,7 @@ class LangchainTracer(BaseCallbackHandler):
|
|
509
527
|
model = list(self.model_names.values())[0]
|
510
528
|
except Exception as e:
|
511
529
|
model=""
|
512
|
-
|
530
|
+
|
513
531
|
self.additional_metadata = {
|
514
532
|
'latency': latency,
|
515
533
|
'model_name': model,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: ragaai_catalyst
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.5b11
|
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.13,>=3.9
|
@@ -13,7 +13,7 @@ ragaai_catalyst/synthetic_data_generation.py,sha256=uDV9tNwto2xSkWg5XHXUvjErW-4P
|
|
13
13
|
ragaai_catalyst/utils.py,sha256=TlhEFwLyRU690HvANbyoRycR3nQ67lxVUQoUOfTPYQ0,3772
|
14
14
|
ragaai_catalyst/tracers/__init__.py,sha256=LfgTes-nHpazssbGKnn8kyLZNr49kIPrlkrqqoTFTfc,301
|
15
15
|
ragaai_catalyst/tracers/distributed.py,sha256=AIRvS5Ur4jbFDXsUkYuCTmtGoHHx3LOG4n5tWOh610U,10330
|
16
|
-
ragaai_catalyst/tracers/langchain_callback.py,sha256=
|
16
|
+
ragaai_catalyst/tracers/langchain_callback.py,sha256=ubdkiaE7iouE5vUGmTcRQyfVVzRwNOiwr8qBEVHzWUY,29672
|
17
17
|
ragaai_catalyst/tracers/llamaindex_callback.py,sha256=ZY0BJrrlz-P9Mg2dX-ZkVKG3gSvzwqBtk7JL_05MiYA,14028
|
18
18
|
ragaai_catalyst/tracers/tracer.py,sha256=Yq2HhgT4785t9573kksJ7ngM3qCLPgZbZ0IpgOHdTTo,19223
|
19
19
|
ragaai_catalyst/tracers/upload_traces.py,sha256=2TWdRTN6FMaX-dqDv8BJWQS0xrCGYKkXEYOi2kK3Z3Y,5487
|
@@ -65,8 +65,8 @@ ragaai_catalyst/tracers/utils/__init__.py,sha256=KeMaZtYaTojilpLv65qH08QmpYclfpa
|
|
65
65
|
ragaai_catalyst/tracers/utils/convert_langchain_callbacks_output.py,sha256=ofrNrxf2b1hpjDh_zeaxiYq86azn1MF3kW8-ViYPEg0,1641
|
66
66
|
ragaai_catalyst/tracers/utils/langchain_tracer_extraction_logic.py,sha256=cghjCuUe8w-2MZdh9xgtRGe3y219u26GGzpnuY4Wt6Q,3047
|
67
67
|
ragaai_catalyst/tracers/utils/utils.py,sha256=ViygfJ7vZ7U0CTSA1lbxVloHp4NSlmfDzBRNCJuMhis,2374
|
68
|
-
ragaai_catalyst-2.1.
|
69
|
-
ragaai_catalyst-2.1.
|
70
|
-
ragaai_catalyst-2.1.
|
71
|
-
ragaai_catalyst-2.1.
|
72
|
-
ragaai_catalyst-2.1.
|
68
|
+
ragaai_catalyst-2.1.5b11.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
69
|
+
ragaai_catalyst-2.1.5b11.dist-info/METADATA,sha256=A3LseUSFntmA9h5JlnduRSGafGSRc-BrBxfkw8aHxUc,12765
|
70
|
+
ragaai_catalyst-2.1.5b11.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
71
|
+
ragaai_catalyst-2.1.5b11.dist-info/top_level.txt,sha256=HpgsdRgEJMk8nqrU6qdCYk3di7MJkDL0B19lkc7dLfM,16
|
72
|
+
ragaai_catalyst-2.1.5b11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|