@launchdarkly/server-sdk-ai 0.12.2 → 0.13.0
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.
- package/CHANGELOG.md +19 -0
- package/README.md +1 -1
- package/__tests__/LDAIClientImpl.test.ts +20 -6
- package/dist/LDAIClientImpl.d.ts +1 -0
- package/dist/LDAIClientImpl.d.ts.map +1 -1
- package/dist/LDAIClientImpl.js +17 -4
- package/dist/LDAIClientImpl.js.map +1 -1
- package/dist/LDAIConfigMapper.d.ts +4 -0
- package/dist/LDAIConfigMapper.d.ts.map +1 -1
- package/dist/LDAIConfigMapper.js +4 -0
- package/dist/LDAIConfigMapper.js.map +1 -1
- package/dist/LDAIConfigTrackerImpl.d.ts +2 -0
- package/dist/LDAIConfigTrackerImpl.d.ts.map +1 -1
- package/dist/LDAIConfigTrackerImpl.js +42 -0
- package/dist/LDAIConfigTrackerImpl.js.map +1 -1
- package/dist/api/config/LDAIConfig.d.ts +3 -0
- package/dist/api/config/LDAIConfig.d.ts.map +1 -1
- package/dist/api/config/LDAIConfigTracker.d.ts +25 -0
- package/dist/api/config/LDAIConfigTracker.d.ts.map +1 -1
- package/dist/api/config/VercelAISDK.d.ts +12 -0
- package/dist/api/config/VercelAISDK.d.ts.map +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AIProvider.html +10 -10
- package/docs/classes/AIProviderFactory.html +10 -10
- package/docs/classes/TrackedChat.html +17 -17
- package/docs/enums/LDFeedbackKind.html +8 -8
- package/docs/functions/createBedrockTokenUsage.html +6 -6
- package/docs/functions/createOpenAiUsage.html +6 -6
- package/docs/functions/createVercelAISDKTokenUsage.html +6 -6
- package/docs/functions/initAi.html +6 -6
- package/docs/index.html +8 -8
- package/docs/interfaces/ChatResponse.html +8 -8
- package/docs/interfaces/LDAIAgent.html +11 -11
- package/docs/interfaces/LDAIAgentConfig.html +9 -9
- package/docs/interfaces/LDAIClient.html +10 -10
- package/docs/interfaces/LDAIConfig.html +15 -12
- package/docs/interfaces/LDAIConfigTracker.html +82 -20
- package/docs/interfaces/LDAIMetrics.html +8 -8
- package/docs/interfaces/LDLogger.html +5 -5
- package/docs/interfaces/LDMessage.html +8 -8
- package/docs/interfaces/LDModelConfig.html +9 -9
- package/docs/interfaces/LDProviderConfig.html +7 -7
- package/docs/interfaces/LDTokenUsage.html +9 -9
- package/docs/interfaces/VercelAISDKConfig.html +45 -40
- package/docs/interfaces/VercelAISDKMapOptions.html +14 -9
- package/docs/types/LDAIAgentDefaults.html +6 -6
- package/docs/types/LDAIDefaults.html +6 -6
- package/docs/types/SupportedAIProvider.html +6 -6
- package/docs/types/VercelAISDKProvider.html +11 -7
- package/docs/variables/SUPPORTED_AI_PROVIDERS.html +6 -6
- package/package.json +1 -1
- package/src/LDAIClientImpl.ts +30 -8
- package/src/LDAIConfigMapper.ts +4 -0
- package/src/LDAIConfigTrackerImpl.ts +52 -0
- package/src/api/config/LDAIConfig.ts +3 -0
- package/src/api/config/LDAIConfigTracker.ts +29 -0
- package/src/api/config/VercelAISDK.ts +12 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDAIConfig | @launchdarkly/server-sdk-ai - v0.
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDAIConfig | @launchdarkly/server-sdk-ai - v0.13.0</title><meta name="description" content="Documentation for @launchdarkly/server-sdk-ai"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.13.0</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-content">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<ul class="tsd-hierarchy">
|
|
25
25
|
<li><span class="target">LDAIConfig</span></li></ul></section><aside class="tsd-sources">
|
|
26
26
|
<ul>
|
|
27
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
27
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfig.ts#L48">sdk/server-ai/src/api/config/LDAIConfig.ts:48</a></li></ul></aside>
|
|
28
28
|
<section class="tsd-panel-group tsd-index-group">
|
|
29
29
|
<section class="tsd-panel tsd-index-panel">
|
|
30
30
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</div>
|
|
49
49
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
50
50
|
<ul>
|
|
51
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
51
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfig.ts#L71">sdk/server-ai/src/api/config/LDAIConfig.ts:71</a></li></ul></aside></section>
|
|
52
52
|
<section class="tsd-panel tsd-member"><a id="messages" class="tsd-anchor"></a>
|
|
53
53
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>messages</span><a href="#messages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
54
54
|
<div class="tsd-signature"><span class="tsd-kind-property">messages</span><span class="tsd-signature-symbol">?:</span> <a href="LDMessage.html" class="tsd-signature-type tsd-kind-interface">LDMessage</a><span class="tsd-signature-symbol">[]</span></div>
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
58
58
|
<ul>
|
|
59
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
59
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfig.ts#L56">sdk/server-ai/src/api/config/LDAIConfig.ts:56</a></li></ul></aside></section>
|
|
60
60
|
<section class="tsd-panel tsd-member"><a id="model" class="tsd-anchor"></a>
|
|
61
61
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>model</span><a href="#model" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
62
62
|
<div class="tsd-signature"><span class="tsd-kind-property">model</span><span class="tsd-signature-symbol">?:</span> <a href="LDModelConfig.html" class="tsd-signature-type tsd-kind-interface">LDModelConfig</a></div>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
66
66
|
<ul>
|
|
67
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
67
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfig.ts#L52">sdk/server-ai/src/api/config/LDAIConfig.ts:52</a></li></ul></aside></section>
|
|
68
68
|
<section class="tsd-panel tsd-member"><a id="provider" class="tsd-anchor"></a>
|
|
69
69
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>provider</span><a href="#provider" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
70
70
|
<div class="tsd-signature"><span class="tsd-kind-property">provider</span><span class="tsd-signature-symbol">?:</span> <a href="LDProviderConfig.html" class="tsd-signature-type tsd-kind-interface">LDProviderConfig</a></div>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
</div>
|
|
73
73
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
74
74
|
<ul>
|
|
75
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
75
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfig.ts#L61">sdk/server-ai/src/api/config/LDAIConfig.ts:61</a></li></ul></aside></section>
|
|
76
76
|
<section class="tsd-panel tsd-member"><a id="toVercelAISDK" class="tsd-anchor"></a>
|
|
77
77
|
<h3 class="tsd-anchor-link"><span>to<wbr/>VercelAISDK</span><a href="#toVercelAISDK" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
78
78
|
<div class="tsd-signature"><span class="tsd-kind-property">to<wbr/>VercelAISDK</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">TMod</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">provider</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><a href="VercelAISDKConfig.html" class="tsd-signature-type tsd-kind-interface">VercelAISDKConfig</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">TMod</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span></div>
|
|
@@ -106,10 +106,13 @@ and streamText() methods.</p>
|
|
|
106
106
|
<h4 class="tsd-returns-title">Returns <a href="VercelAISDKConfig.html" class="tsd-signature-type tsd-kind-interface">VercelAISDKConfig</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">TMod</span><span class="tsd-signature-symbol">></span></h4><p>A configuration directly usable in Vercel AI SDK generateText() and streamText()</p>
|
|
107
107
|
|
|
108
108
|
<div class="tsd-comment tsd-typography">
|
|
109
|
+
<h4>Deprecated</h4><p>Use <code>VercelProvider.toVercelAISDK()</code> from the <code>@launchdarkly/server-sdk-ai-vercel</code> package instead.
|
|
110
|
+
This method will be removed in a future version.</p>
|
|
111
|
+
|
|
109
112
|
<h4>Throws</h4><p>if a Vercel AI SDK model cannot be determined from the given provider parameter.</p>
|
|
110
113
|
</div></li></ul></li></ul></div><aside class="tsd-sources">
|
|
111
114
|
<ul>
|
|
112
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
115
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfig.ts#L87">sdk/server-ai/src/api/config/LDAIConfig.ts:87</a></li></ul></aside></section>
|
|
113
116
|
<section class="tsd-panel tsd-member"><a id="tracker" class="tsd-anchor"></a>
|
|
114
117
|
<h3 class="tsd-anchor-link"><span>tracker</span><a href="#tracker" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
115
118
|
<div class="tsd-signature"><span class="tsd-kind-property">tracker</span><span class="tsd-signature-symbol">:</span> <a href="LDAIConfigTracker.html" class="tsd-signature-type tsd-kind-interface">LDAIConfigTracker</a></div>
|
|
@@ -117,7 +120,7 @@ and streamText() methods.</p>
|
|
|
117
120
|
</div>
|
|
118
121
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
119
122
|
<ul>
|
|
120
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
123
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfig.ts#L66">sdk/server-ai/src/api/config/LDAIConfig.ts:66</a></li></ul></aside></section></section></div>
|
|
121
124
|
<div class="col-sidebar">
|
|
122
125
|
<div class="page-menu">
|
|
123
126
|
<div class="tsd-navigation settings">
|
|
@@ -144,7 +147,7 @@ and streamText() methods.</p>
|
|
|
144
147
|
<li><a href="#toVercelAISDK" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>to<wbr/>VercelAISDK</span></a></li>
|
|
145
148
|
<li><a href="#tracker" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>tracker</span></a></li></ul></div></details></div>
|
|
146
149
|
<div class="site-menu">
|
|
147
|
-
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.
|
|
150
|
+
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.13.0</span></a>
|
|
148
151
|
<ul class="tsd-small-nested-navigation">
|
|
149
152
|
<li><a href="../enums/LDFeedbackKind.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>LDFeedback<wbr/>Kind</span></a></li>
|
|
150
153
|
<li><a href="../classes/AIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AIProvider</span></a></li>
|
|
@@ -162,8 +165,8 @@ and streamText() methods.</p>
|
|
|
162
165
|
<li><a href="LDModelConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDModel<wbr/>Config</span></a></li>
|
|
163
166
|
<li><a href="LDProviderConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDProvider<wbr/>Config</span></a></li>
|
|
164
167
|
<li><a href="LDTokenUsage.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDToken<wbr/>Usage</span></a></li>
|
|
165
|
-
<li><a href="VercelAISDKConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
166
|
-
<li><a href="VercelAISDKMapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
168
|
+
<li><a href="VercelAISDKConfig.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
169
|
+
<li><a href="VercelAISDKMapOptions.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
167
170
|
<li><a href="../types/LDAIAgentDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>LDAIAgent<wbr/>Defaults</span></a></li>
|
|
168
171
|
<li><a href="../types/LDAIDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>LDAIDefaults</span></a></li>
|
|
169
172
|
<li><a href="../types/SupportedAIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>SupportedAIProvider</span></a></li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDAIConfigTracker | @launchdarkly/server-sdk-ai - v0.
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDAIConfigTracker | @launchdarkly/server-sdk-ai - v0.13.0</title><meta name="description" content="Documentation for @launchdarkly/server-sdk-ai"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.13.0</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-content">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<ul class="tsd-hierarchy">
|
|
25
25
|
<li><span class="target">LDAIConfigTracker</span></li></ul></section><aside class="tsd-sources">
|
|
26
26
|
<ul>
|
|
27
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
27
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L36">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:36</a></li></ul></aside>
|
|
28
28
|
<section class="tsd-panel-group tsd-index-group">
|
|
29
29
|
<section class="tsd-panel tsd-index-panel">
|
|
30
30
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
<a href="LDAIConfigTracker.html#trackFeedback" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Feedback</span></a>
|
|
41
41
|
<a href="LDAIConfigTracker.html#trackMetricsOf" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Metrics<wbr/>Of</span></a>
|
|
42
42
|
<a href="LDAIConfigTracker.html#trackOpenAIMetrics" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>OpenAIMetrics</span></a>
|
|
43
|
+
<a href="LDAIConfigTracker.html#trackStreamMetricsOf" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Stream<wbr/>Metrics<wbr/>Of</span></a>
|
|
43
44
|
<a href="LDAIConfigTracker.html#trackSuccess" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Success</span></a>
|
|
44
45
|
<a href="LDAIConfigTracker.html#trackTimeToFirstToken" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Time<wbr/>To<wbr/>First<wbr/>Token</span></a>
|
|
45
46
|
<a href="LDAIConfigTracker.html#trackTokens" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Tokens</span></a>
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">LDAIMetricSummary</span></h4>
|
|
59
60
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
60
61
|
<ul>
|
|
61
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
62
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L240">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:240</a></li></ul></aside></li></ul></section>
|
|
62
63
|
<section class="tsd-panel tsd-member"><a id="trackBedrockConverseMetrics" class="tsd-anchor"></a>
|
|
63
64
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Bedrock<wbr/>Converse<wbr/>Metrics</span><a href="#trackBedrockConverseMetrics" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
64
65
|
<ul class="tsd-signatures">
|
|
@@ -83,7 +84,7 @@
|
|
|
83
84
|
|
|
84
85
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
85
86
|
<ul>
|
|
86
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
87
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L167">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:167</a></li></ul></aside></li></ul></section>
|
|
87
88
|
<section class="tsd-panel tsd-member"><a id="trackDuration" class="tsd-anchor"></a>
|
|
88
89
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Duration</span><a href="#trackDuration" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
89
90
|
<ul class="tsd-signatures">
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
103
104
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
104
105
|
<ul>
|
|
105
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
106
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L44">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:44</a></li></ul></aside></li></ul></section>
|
|
106
107
|
<section class="tsd-panel tsd-member"><a id="trackDurationOf" class="tsd-anchor"></a>
|
|
107
108
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Duration<wbr/>Of</span><a href="#trackDurationOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
108
109
|
<ul class="tsd-signatures">
|
|
@@ -130,7 +131,7 @@ In the case the provided function throws, this function will still record the du
|
|
|
130
131
|
|
|
131
132
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
132
133
|
<ul>
|
|
133
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
134
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L88">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:88</a></li></ul></aside></li></ul></section>
|
|
134
135
|
<section class="tsd-panel tsd-member"><a id="trackError" class="tsd-anchor"></a>
|
|
135
136
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Error</span><a href="#trackError" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
136
137
|
<ul class="tsd-signatures">
|
|
@@ -141,7 +142,7 @@ In the case the provided function throws, this function will still record the du
|
|
|
141
142
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
142
143
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
143
144
|
<ul>
|
|
144
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
145
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L61">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:61</a></li></ul></aside></li></ul></section>
|
|
145
146
|
<section class="tsd-panel tsd-member"><a id="trackFeedback" class="tsd-anchor"></a>
|
|
146
147
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Feedback</span><a href="#trackFeedback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
147
148
|
<ul class="tsd-signatures">
|
|
@@ -162,7 +163,7 @@ In the case the provided function throws, this function will still record the du
|
|
|
162
163
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
163
164
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
164
165
|
<ul>
|
|
165
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
166
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L68">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:68</a></li></ul></aside></li></ul></section>
|
|
166
167
|
<section class="tsd-panel tsd-member"><a id="trackMetricsOf" class="tsd-anchor"></a>
|
|
167
168
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Metrics<wbr/>Of</span><a href="#trackMetricsOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
168
169
|
<ul class="tsd-signatures">
|
|
@@ -212,7 +213,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
212
213
|
|
|
213
214
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
214
215
|
<ul>
|
|
215
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
216
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L104">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:104</a></li></ul></aside></li></ul></section>
|
|
216
217
|
<section class="tsd-panel tsd-member"><a id="trackOpenAIMetrics" class="tsd-anchor"></a>
|
|
217
218
|
<h3 class="tsd-anchor-link"><span>track<wbr/>OpenAIMetrics</span><a href="#trackOpenAIMetrics" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
218
219
|
<ul class="tsd-signatures">
|
|
@@ -246,7 +247,64 @@ A failed operation will not have any token usage data.</p>
|
|
|
246
247
|
|
|
247
248
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
248
249
|
<ul>
|
|
249
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
250
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L147">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:147</a></li></ul></aside></li></ul></section>
|
|
251
|
+
<section class="tsd-panel tsd-member"><a id="trackStreamMetricsOf" class="tsd-anchor"></a>
|
|
252
|
+
<h3 class="tsd-anchor-link"><span>track<wbr/>Stream<wbr/>Metrics<wbr/>Of</span><a href="#trackStreamMetricsOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
253
|
+
<ul class="tsd-signatures">
|
|
254
|
+
<li class="tsd-signature tsd-anchor-link" id="trackStreamMetricsOf.trackStreamMetricsOf-1"><span class="tsd-kind-call-signature">track<wbr/>Stream<wbr/>Metrics<wbr/>Of</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">TStream</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">streamCreator</span>, <span class="tsd-kind-parameter">metricsExtractor</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">TStream</span><a href="#trackStreamMetricsOf.trackStreamMetricsOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
255
|
+
<li class="tsd-description">
|
|
256
|
+
<div class="tsd-comment tsd-typography"><p>Track metrics for a streaming AI operation.</p>
|
|
257
|
+
<p>This function will track the duration of the operation, extract metrics using the provided
|
|
258
|
+
metrics extractor function, and track success or error status accordingly.</p>
|
|
259
|
+
<p>Unlike trackMetricsOf, this method is designed for streaming operations where:</p>
|
|
260
|
+
<ul>
|
|
261
|
+
<li>The stream is created and returned immediately (synchronously)</li>
|
|
262
|
+
<li>Metrics are extracted asynchronously in the background once the stream completes</li>
|
|
263
|
+
<li>Duration is tracked from stream creation to metrics extraction completion</li>
|
|
264
|
+
</ul>
|
|
265
|
+
<p>The stream is returned immediately so the caller can begin consuming it without waiting.
|
|
266
|
+
Metrics extraction happens in the background and does not block stream consumption.</p>
|
|
267
|
+
<p>If the stream creator throws, then this method will also throw and record an error.
|
|
268
|
+
If metrics extraction fails, the error is logged but does not affect stream consumption.</p>
|
|
269
|
+
</div>
|
|
270
|
+
<section class="tsd-panel">
|
|
271
|
+
<h4>Type Parameters</h4>
|
|
272
|
+
<ul class="tsd-type-parameter-list">
|
|
273
|
+
<li>
|
|
274
|
+
<h4><span class="tsd-kind-type-parameter">TStream</span></h4></li></ul></section>
|
|
275
|
+
<div class="tsd-parameters">
|
|
276
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
277
|
+
<ul class="tsd-parameter-list">
|
|
278
|
+
<li>
|
|
279
|
+
<h5><span class="tsd-kind-parameter">streamCreator</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type tsd-kind-type-parameter">TStream</span><span class="tsd-signature-symbol">)</span></h5>
|
|
280
|
+
<div class="tsd-comment tsd-typography"><p>Function that creates and returns the stream (synchronous)</p>
|
|
281
|
+
</div>
|
|
282
|
+
<ul class="tsd-parameters">
|
|
283
|
+
<li class="tsd-parameter-signature">
|
|
284
|
+
<ul class="tsd-signatures">
|
|
285
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">TStream</span></li>
|
|
286
|
+
<li class="tsd-description">
|
|
287
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">TStream</span></h4></li></ul></li></ul></li>
|
|
288
|
+
<li>
|
|
289
|
+
<h5><span class="tsd-kind-parameter">metricsExtractor</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><a href="LDAIMetrics.html" class="tsd-signature-type tsd-kind-interface">LDAIMetrics</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span></h5>
|
|
290
|
+
<div class="tsd-comment tsd-typography"><p>Function that asynchronously extracts metrics from the stream</p>
|
|
291
|
+
</div>
|
|
292
|
+
<ul class="tsd-parameters">
|
|
293
|
+
<li class="tsd-parameter-signature">
|
|
294
|
+
<ul class="tsd-signatures">
|
|
295
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><a href="LDAIMetrics.html" class="tsd-signature-type tsd-kind-interface">LDAIMetrics</a><span class="tsd-signature-symbol">></span></li>
|
|
296
|
+
<li class="tsd-description">
|
|
297
|
+
<div class="tsd-parameters">
|
|
298
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
299
|
+
<ul class="tsd-parameter-list">
|
|
300
|
+
<li>
|
|
301
|
+
<h5><span class="tsd-kind-parameter">stream</span>: <span class="tsd-signature-type tsd-kind-type-parameter">TStream</span></h5></li></ul></div>
|
|
302
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol"><</span><a href="LDAIMetrics.html" class="tsd-signature-type tsd-kind-interface">LDAIMetrics</a><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></li></ul></div>
|
|
303
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">TStream</span></h4><p>The stream result (returned immediately, not a Promise)</p>
|
|
304
|
+
|
|
305
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
306
|
+
<ul>
|
|
307
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L130">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:130</a></li></ul></aside></li></ul></section>
|
|
250
308
|
<section class="tsd-panel tsd-member"><a id="trackSuccess" class="tsd-anchor"></a>
|
|
251
309
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Success</span><a href="#trackSuccess" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
252
310
|
<ul class="tsd-signatures">
|
|
@@ -257,7 +315,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
257
315
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
258
316
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
259
317
|
<ul>
|
|
260
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
318
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L56">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:56</a></li></ul></aside></li></ul></section>
|
|
261
319
|
<section class="tsd-panel tsd-member"><a id="trackTimeToFirstToken" class="tsd-anchor"></a>
|
|
262
320
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Time<wbr/>To<wbr/>First<wbr/>Token</span><a href="#trackTimeToFirstToken" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
263
321
|
<ul class="tsd-signatures">
|
|
@@ -275,7 +333,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
275
333
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
276
334
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
277
335
|
<ul>
|
|
278
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
336
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L75">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:75</a></li></ul></aside></li></ul></section>
|
|
279
337
|
<section class="tsd-panel tsd-member"><a id="trackTokens" class="tsd-anchor"></a>
|
|
280
338
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Tokens</span><a href="#trackTokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
281
339
|
<ul class="tsd-signatures">
|
|
@@ -293,7 +351,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
293
351
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
294
352
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
295
353
|
<ul>
|
|
296
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
354
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L51">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:51</a></li></ul></aside></li></ul></section>
|
|
297
355
|
<section class="tsd-panel tsd-member"><a id="trackVercelAISDKGenerateTextMetrics" class="tsd-anchor"></a>
|
|
298
356
|
<h3 class="tsd-anchor-link"><span>track<wbr/>VercelAISDKGenerate<wbr/>Text<wbr/>Metrics</span><a href="#trackVercelAISDKGenerateTextMetrics" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
299
357
|
<ul class="tsd-signatures">
|
|
@@ -327,7 +385,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
327
385
|
|
|
328
386
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
329
387
|
<ul>
|
|
330
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
388
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L193">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:193</a></li></ul></aside></li></ul></section>
|
|
331
389
|
<section class="tsd-panel tsd-member"><a id="trackVercelAISDKStreamTextMetrics" class="tsd-anchor"></a>
|
|
332
390
|
<h3 class="tsd-anchor-link"><span>track<wbr/>VercelAISDKStream<wbr/>Text<wbr/>Metrics</span><a href="#trackVercelAISDKStreamTextMetrics" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
333
391
|
<ul class="tsd-signatures">
|
|
@@ -359,9 +417,12 @@ A failed operation will not have any token usage data.</p>
|
|
|
359
417
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">TRes</span></h4></li></ul></li></ul></li></ul></div>
|
|
360
418
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">TRes</span></h4><p>The result of the operation.</p>
|
|
361
419
|
|
|
362
|
-
<div class="tsd-comment tsd-typography"
|
|
420
|
+
<div class="tsd-comment tsd-typography">
|
|
421
|
+
<h4>Deprecated</h4><p>Use <code>trackStreamMetricsOf()</code> with <code>VercelProvider.createStreamMetricsExtractor()</code> from the
|
|
422
|
+
<code>@launchdarkly/server-sdk-ai-vercel</code> package instead. This method will be removed in a future version.</p>
|
|
423
|
+
</div><aside class="tsd-sources">
|
|
363
424
|
<ul>
|
|
364
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
425
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L222">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:222</a></li></ul></aside></li></ul></section></section></div>
|
|
365
426
|
<div class="col-sidebar">
|
|
366
427
|
<div class="page-menu">
|
|
367
428
|
<div class="tsd-navigation settings">
|
|
@@ -389,13 +450,14 @@ A failed operation will not have any token usage data.</p>
|
|
|
389
450
|
<li><a href="#trackFeedback" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Feedback</span></a></li>
|
|
390
451
|
<li><a href="#trackMetricsOf" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Metrics<wbr/>Of</span></a></li>
|
|
391
452
|
<li><a href="#trackOpenAIMetrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>OpenAIMetrics</span></a></li>
|
|
453
|
+
<li><a href="#trackStreamMetricsOf" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Stream<wbr/>Metrics<wbr/>Of</span></a></li>
|
|
392
454
|
<li><a href="#trackSuccess" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Success</span></a></li>
|
|
393
455
|
<li><a href="#trackTimeToFirstToken" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Time<wbr/>To<wbr/>First<wbr/>Token</span></a></li>
|
|
394
456
|
<li><a href="#trackTokens" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Tokens</span></a></li>
|
|
395
457
|
<li><a href="#trackVercelAISDKGenerateTextMetrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>VercelAISDKGenerate<wbr/>Text<wbr/>Metrics</span></a></li>
|
|
396
458
|
<li><a href="#trackVercelAISDKStreamTextMetrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>VercelAISDKStream<wbr/>Text<wbr/>Metrics</span></a></li></ul></div></details></div>
|
|
397
459
|
<div class="site-menu">
|
|
398
|
-
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.
|
|
460
|
+
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.13.0</span></a>
|
|
399
461
|
<ul class="tsd-small-nested-navigation">
|
|
400
462
|
<li><a href="../enums/LDFeedbackKind.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>LDFeedback<wbr/>Kind</span></a></li>
|
|
401
463
|
<li><a href="../classes/AIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AIProvider</span></a></li>
|
|
@@ -413,8 +475,8 @@ A failed operation will not have any token usage data.</p>
|
|
|
413
475
|
<li><a href="LDModelConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDModel<wbr/>Config</span></a></li>
|
|
414
476
|
<li><a href="LDProviderConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDProvider<wbr/>Config</span></a></li>
|
|
415
477
|
<li><a href="LDTokenUsage.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDToken<wbr/>Usage</span></a></li>
|
|
416
|
-
<li><a href="VercelAISDKConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
417
|
-
<li><a href="VercelAISDKMapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
478
|
+
<li><a href="VercelAISDKConfig.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
479
|
+
<li><a href="VercelAISDKMapOptions.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
418
480
|
<li><a href="../types/LDAIAgentDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>LDAIAgent<wbr/>Defaults</span></a></li>
|
|
419
481
|
<li><a href="../types/LDAIDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>LDAIDefaults</span></a></li>
|
|
420
482
|
<li><a href="../types/SupportedAIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>SupportedAIProvider</span></a></li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDAIMetrics | @launchdarkly/server-sdk-ai - v0.
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDAIMetrics | @launchdarkly/server-sdk-ai - v0.13.0</title><meta name="description" content="Documentation for @launchdarkly/server-sdk-ai"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.13.0</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-content">
|
|
@@ -25,7 +25,7 @@ This class combines success/failure tracking with token usage metrics.</p>
|
|
|
25
25
|
<ul class="tsd-hierarchy">
|
|
26
26
|
<li><span class="target">LDAIMetrics</span></li></ul></section><aside class="tsd-sources">
|
|
27
27
|
<ul>
|
|
28
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
28
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/metrics/LDAIMetrics.ts#L7">sdk/server-ai/src/api/metrics/LDAIMetrics.ts:7</a></li></ul></aside>
|
|
29
29
|
<section class="tsd-panel-group tsd-index-group">
|
|
30
30
|
<section class="tsd-panel tsd-index-panel">
|
|
31
31
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -45,7 +45,7 @@ This class combines success/failure tracking with token usage metrics.</p>
|
|
|
45
45
|
</div>
|
|
46
46
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
47
47
|
<ul>
|
|
48
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
48
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/metrics/LDAIMetrics.ts#L11">sdk/server-ai/src/api/metrics/LDAIMetrics.ts:11</a></li></ul></aside></section>
|
|
49
49
|
<section class="tsd-panel tsd-member"><a id="usage" class="tsd-anchor"></a>
|
|
50
50
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>usage</span><a href="#usage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
51
51
|
<div class="tsd-signature"><span class="tsd-kind-property">usage</span><span class="tsd-signature-symbol">?:</span> <a href="LDTokenUsage.html" class="tsd-signature-type tsd-kind-interface">LDTokenUsage</a></div>
|
|
@@ -54,7 +54,7 @@ This will be undefined if no token usage data is available.</p>
|
|
|
54
54
|
</div>
|
|
55
55
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
56
56
|
<ul>
|
|
57
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
57
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/5339456/packages/sdk/server-ai/src/api/metrics/LDAIMetrics.ts#L17">sdk/server-ai/src/api/metrics/LDAIMetrics.ts:17</a></li></ul></aside></section></section></div>
|
|
58
58
|
<div class="col-sidebar">
|
|
59
59
|
<div class="page-menu">
|
|
60
60
|
<div class="tsd-navigation settings">
|
|
@@ -77,7 +77,7 @@ This will be undefined if no token usage data is available.</p>
|
|
|
77
77
|
<li><a href="#success" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>success</span></a></li>
|
|
78
78
|
<li><a href="#usage" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>usage</span></a></li></ul></div></details></div>
|
|
79
79
|
<div class="site-menu">
|
|
80
|
-
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.
|
|
80
|
+
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.13.0</span></a>
|
|
81
81
|
<ul class="tsd-small-nested-navigation">
|
|
82
82
|
<li><a href="../enums/LDFeedbackKind.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>LDFeedback<wbr/>Kind</span></a></li>
|
|
83
83
|
<li><a href="../classes/AIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AIProvider</span></a></li>
|
|
@@ -95,8 +95,8 @@ This will be undefined if no token usage data is available.</p>
|
|
|
95
95
|
<li><a href="LDModelConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDModel<wbr/>Config</span></a></li>
|
|
96
96
|
<li><a href="LDProviderConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDProvider<wbr/>Config</span></a></li>
|
|
97
97
|
<li><a href="LDTokenUsage.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDToken<wbr/>Usage</span></a></li>
|
|
98
|
-
<li><a href="VercelAISDKConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
99
|
-
<li><a href="VercelAISDKMapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
98
|
+
<li><a href="VercelAISDKConfig.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
99
|
+
<li><a href="VercelAISDKMapOptions.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
100
100
|
<li><a href="../types/LDAIAgentDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>LDAIAgent<wbr/>Defaults</span></a></li>
|
|
101
101
|
<li><a href="../types/LDAIDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>LDAIDefaults</span></a></li>
|
|
102
102
|
<li><a href="../types/SupportedAIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>SupportedAIProvider</span></a></li>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDLogger | @launchdarkly/server-sdk-ai - v0.
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDLogger | @launchdarkly/server-sdk-ai - v0.13.0</title><meta name="description" content="Documentation for @launchdarkly/server-sdk-ai"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.13.0</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-content">
|
|
@@ -145,7 +145,7 @@ implementation with a minimum level of <code>info</code>.</p>
|
|
|
145
145
|
<li><a href="#info" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>info</span></a></li>
|
|
146
146
|
<li><a href="#warn" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>warn</span></a></li></ul></div></details></div>
|
|
147
147
|
<div class="site-menu">
|
|
148
|
-
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.
|
|
148
|
+
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>@launchdarkly/server-<wbr/>sdk-<wbr/>ai -<wbr/> v0.13.0</span></a>
|
|
149
149
|
<ul class="tsd-small-nested-navigation">
|
|
150
150
|
<li><a href="../enums/LDFeedbackKind.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>LDFeedback<wbr/>Kind</span></a></li>
|
|
151
151
|
<li><a href="../classes/AIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AIProvider</span></a></li>
|
|
@@ -163,8 +163,8 @@ implementation with a minimum level of <code>info</code>.</p>
|
|
|
163
163
|
<li><a href="LDModelConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDModel<wbr/>Config</span></a></li>
|
|
164
164
|
<li><a href="LDProviderConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDProvider<wbr/>Config</span></a></li>
|
|
165
165
|
<li><a href="LDTokenUsage.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>LDToken<wbr/>Usage</span></a></li>
|
|
166
|
-
<li><a href="VercelAISDKConfig.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
167
|
-
<li><a href="VercelAISDKMapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
166
|
+
<li><a href="VercelAISDKConfig.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKConfig</span></a></li>
|
|
167
|
+
<li><a href="VercelAISDKMapOptions.html" class="deprecated"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>VercelAISDKMap<wbr/>Options</span></a></li>
|
|
168
168
|
<li><a href="../types/LDAIAgentDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>LDAIAgent<wbr/>Defaults</span></a></li>
|
|
169
169
|
<li><a href="../types/LDAIDefaults.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>LDAIDefaults</span></a></li>
|
|
170
170
|
<li><a href="../types/SupportedAIProvider.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2097152"></use></svg><span>SupportedAIProvider</span></a></li>
|