paid-python 0.3.1__py3-none-any.whl → 0.3.3__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.
paid/tracing/tracing.py CHANGED
@@ -66,15 +66,18 @@ class PaidSpanProcessor(SpanProcessor):
66
66
  """
67
67
 
68
68
  SPAN_NAME_PREFIX = "paid.trace."
69
- PROMPT_ATTRIBUTES_PREFIXES = {
70
- "gen_ai.prompt",
69
+ PROMPT_ATTRIBUTES_SUBSTRINGS = {
70
+ "prompt",
71
+ # "gen_ai.prompt",
71
72
  "gen_ai.completion",
72
73
  "gen_ai.request.messages",
73
74
  "gen_ai.response.messages",
74
75
  "llm.output_message",
75
76
  "llm.input_message",
77
+ "llm.invocation_parameters",
76
78
  "output.value",
77
79
  "input.value",
80
+ # "langchain.prompt",
78
81
  }
79
82
 
80
83
  def on_start(self, span: Span, parent_context: Optional[Context] = None) -> None:
@@ -124,7 +127,7 @@ class PaidSpanProcessor(SpanProcessor):
124
127
  filtered_attrs = {
125
128
  k: v
126
129
  for k, v in original_attributes.items()
127
- if not any(k.startswith(prefix) for prefix in self.PROMPT_ATTRIBUTES_PREFIXES)
130
+ if not any(substr in k for substr in self.PROMPT_ATTRIBUTES_SUBSTRINGS)
128
131
  }
129
132
  # This works because the exporter reads attributes during serialization
130
133
  object.__setattr__(span, "_attributes", filtered_attrs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: paid-python
3
- Version: 0.3.1
3
+ Version: 0.3.3
4
4
  Summary:
5
5
  Requires-Python: >=3.9,<3.14
6
6
  Classifier: Intended Audience :: Developers
@@ -42,7 +42,7 @@ paid/tracing/context_data.py,sha256=oiLocz-9qDqB5nQzJlrLsc2Mkr9MaNt_yF_hjppobKc,
42
42
  paid/tracing/context_manager.py,sha256=ZQtsJ9JPxTwn2t4AW26WpYboaOEZdI2T1Sw0Rwsbf-E,8470
43
43
  paid/tracing/distributed_tracing.py,sha256=Vht3U8QJmT5jlRVnrybTn-cI1RPuVtyb3V4eTu6gA4g,3991
44
44
  paid/tracing/signal.py,sha256=PfYxF6EFQS8j7RY5_C5NXrCBVu9Hq2E2tyG4fdQScJk,3252
45
- paid/tracing/tracing.py,sha256=nq3kIoQIJQhzmR9DQy1ayOcOpmDrZzLZc31tjCl0ZiA,14766
45
+ paid/tracing/tracing.py,sha256=HnQjLTfvrEqL_44pXGo-fYh8KXlWBh0ozp3omB6wuTI,14848
46
46
  paid/tracing/wrappers/__init__.py,sha256=IIleLB_JUbzLw7FshrU2VHZAKF3dZHMGy1O5zCBwwqM,1588
47
47
  paid/tracing/wrappers/anthropic/__init__.py,sha256=_x1fjySAQxuT5cIGO_jU09LiGcZH-WQLqKg8mUFAu2w,115
48
48
  paid/tracing/wrappers/anthropic/anthropicWrapper.py,sha256=pGchbOb41CbTxc7H8xXoM-LjR085spqrzXqCVC_rrFk,4913
@@ -99,7 +99,7 @@ paid/usage/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
99
99
  paid/usage/client.py,sha256=280WJuepoovk3BAVbAx2yN2Q_qBdvx3CcPkLu8lXslc,3030
100
100
  paid/usage/raw_client.py,sha256=2acg5C4lxuZodZjepU9QYF0fmBxgG-3ZgXs1zUJG-wM,3709
101
101
  paid/version.py,sha256=QIpDFnOrxMxrs86eL0iNH0mSZ1DO078wWHYY9TYAoew,78
102
- paid_python-0.3.1.dist-info/LICENSE,sha256=Nz4baY1zvv0Qy7lqrQtbaiMhmEeGr2Q7A93aqzpml4c,1071
103
- paid_python-0.3.1.dist-info/METADATA,sha256=1FdLeanO20YNWUwsWdGDasYZdbgSqSSOSLx8tnZxwnI,22335
104
- paid_python-0.3.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
105
- paid_python-0.3.1.dist-info/RECORD,,
102
+ paid_python-0.3.3.dist-info/LICENSE,sha256=Nz4baY1zvv0Qy7lqrQtbaiMhmEeGr2Q7A93aqzpml4c,1071
103
+ paid_python-0.3.3.dist-info/METADATA,sha256=tb9zMnJfciOmVMIwq6G2_R70gk3djrPpXnI50Uootiw,22335
104
+ paid_python-0.3.3.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
105
+ paid_python-0.3.3.dist-info/RECORD,,