rudderstack-ai 0.1.0__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.
- rudderstack/ai/__init__.py +58 -0
- rudderstack/ai/_core.py +1192 -0
- rudderstack/ai/_intercept.py +297 -0
- rudderstack/ai/_pricing.py +139 -0
- rudderstack/ai/_proxy.py +227 -0
- rudderstack/ai/_version.py +3 -0
- rudderstack/ai/anthropic.py +173 -0
- rudderstack/ai/claude_agent_sdk.py +374 -0
- rudderstack/ai/langchain.py +383 -0
- rudderstack/ai/openai.py +259 -0
- rudderstack/ai/py.typed +0 -0
- rudderstack_ai-0.1.0.dist-info/METADATA +490 -0
- rudderstack_ai-0.1.0.dist-info/RECORD +15 -0
- rudderstack_ai-0.1.0.dist-info/WHEEL +4 -0
- rudderstack_ai-0.1.0.dist-info/licenses/LICENSE.md +20 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""RudderStack AI events: product analytics for AI features, through your RudderStack client.
|
|
2
|
+
|
|
3
|
+
Every answer your app gives produces one ``ai_response_received`` with totals, however many
|
|
4
|
+
model calls, agents or tool steps it took, joined to the prompt and to later feedback by
|
|
5
|
+
``interaction_id``. Events follow the AI events spec v0.2.
|
|
6
|
+
|
|
7
|
+
Core API (this module): :func:`configure`, :func:`register_price`, :func:`ai_context`,
|
|
8
|
+
:func:`ai_interaction`, :func:`start_interaction`, :func:`track_action`.
|
|
9
|
+
|
|
10
|
+
Integrations (import explicitly; each needs its extra installed):
|
|
11
|
+
|
|
12
|
+
* ``rudderstack.ai.openai``: :func:`~rudderstack.ai.openai.wrap_openai`
|
|
13
|
+
* ``rudderstack.ai.anthropic``: :func:`~rudderstack.ai.anthropic.wrap_anthropic`
|
|
14
|
+
* ``rudderstack.ai.langchain``: :class:`~rudderstack.ai.langchain.RudderStackCallbackHandler`
|
|
15
|
+
* ``rudderstack.ai.claude_agent_sdk``: :func:`~rudderstack.ai.claude_agent_sdk.tracked_query`
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from ._core import (
|
|
19
|
+
SPEC_VERSION,
|
|
20
|
+
ActionType,
|
|
21
|
+
AIContext,
|
|
22
|
+
AnalyticsClient,
|
|
23
|
+
Interaction,
|
|
24
|
+
ResponseStatus,
|
|
25
|
+
Trigger,
|
|
26
|
+
ai_context,
|
|
27
|
+
ai_interaction,
|
|
28
|
+
configure,
|
|
29
|
+
current_context,
|
|
30
|
+
current_interaction,
|
|
31
|
+
start_interaction,
|
|
32
|
+
track_action,
|
|
33
|
+
)
|
|
34
|
+
from ._pricing import Price, clear_prices, register_price
|
|
35
|
+
from ._proxy import unwrap
|
|
36
|
+
from ._version import __version__
|
|
37
|
+
|
|
38
|
+
__all__ = [
|
|
39
|
+
"SPEC_VERSION",
|
|
40
|
+
"AIContext",
|
|
41
|
+
"ActionType",
|
|
42
|
+
"AnalyticsClient",
|
|
43
|
+
"Interaction",
|
|
44
|
+
"Price",
|
|
45
|
+
"ResponseStatus",
|
|
46
|
+
"Trigger",
|
|
47
|
+
"__version__",
|
|
48
|
+
"ai_context",
|
|
49
|
+
"ai_interaction",
|
|
50
|
+
"clear_prices",
|
|
51
|
+
"configure",
|
|
52
|
+
"current_context",
|
|
53
|
+
"current_interaction",
|
|
54
|
+
"register_price",
|
|
55
|
+
"start_interaction",
|
|
56
|
+
"track_action",
|
|
57
|
+
"unwrap",
|
|
58
|
+
]
|