@launchdarkly/server-sdk-ai 0.14.0 → 0.14.1
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 +7 -0
- package/__tests__/Judge.test.ts +31 -6
- package/__tests__/LDAIClientImpl.test.ts +5 -0
- package/__tests__/TrackedChat.test.ts +1 -0
- package/dist/package.json +1 -1
- package/dist/src/LDAIClientImpl.js +2 -2
- package/dist/src/LDAIClientImpl.js.map +1 -1
- package/dist/src/LDAIConfigTrackerImpl.d.ts +2 -1
- package/dist/src/LDAIConfigTrackerImpl.d.ts.map +1 -1
- package/dist/src/LDAIConfigTrackerImpl.js +5 -1
- package/dist/src/LDAIConfigTrackerImpl.js.map +1 -1
- package/dist/src/api/chat/TrackedChat.d.ts.map +1 -1
- package/dist/src/api/chat/TrackedChat.js +4 -4
- package/dist/src/api/chat/TrackedChat.js.map +1 -1
- package/dist/src/api/config/LDAIConfigTracker.d.ts +7 -1
- package/dist/src/api/config/LDAIConfigTracker.d.ts.map +1 -1
- package/dist/src/api/config/LDAIConfigUtils.js +16 -12
- package/dist/src/api/config/LDAIConfigUtils.js.map +1 -1
- package/dist/src/api/config/types.d.ts +4 -0
- package/dist/src/api/config/types.d.ts.map +1 -1
- package/dist/src/api/judge/Judge.d.ts.map +1 -1
- package/dist/src/api/judge/Judge.js +2 -0
- package/dist/src/api/judge/Judge.js.map +1 -1
- package/dist/src/api/judge/types.d.ts +2 -0
- package/dist/src/api/judge/types.d.ts.map +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/AIProvider.html +9 -9
- package/docs/classes/AIProviderFactory.html +8 -8
- package/docs/classes/Judge.html +18 -18
- package/docs/classes/TrackedChat.html +19 -19
- package/docs/enums/LDFeedbackKind.html +6 -6
- package/docs/functions/createBedrockTokenUsage.html +4 -4
- package/docs/functions/createOpenAiUsage.html +4 -4
- package/docs/functions/createVercelAISDKTokenUsage.html +4 -4
- package/docs/functions/initAi.html +4 -4
- package/docs/index.html +4 -4
- package/docs/interfaces/ChatResponse.html +7 -7
- package/docs/interfaces/EvalScore.html +6 -6
- package/docs/interfaces/JudgeResponse.html +17 -7
- package/docs/interfaces/LDAIAgentConfig.html +21 -10
- package/docs/interfaces/LDAIAgentConfigDefault.html +9 -9
- package/docs/interfaces/LDAIAgentRequestConfig.html +7 -7
- package/docs/interfaces/LDAIClient.html +14 -14
- package/docs/interfaces/LDAICompletionConfig.html +21 -10
- package/docs/interfaces/LDAICompletionConfigDefault.html +9 -9
- package/docs/interfaces/LDAIConfig.html +18 -8
- package/docs/interfaces/LDAIConfigDefault.html +7 -7
- package/docs/interfaces/LDAIConfigTracker.html +39 -19
- package/docs/interfaces/LDAIJudgeConfig.html +21 -10
- package/docs/interfaces/LDAIJudgeConfigDefault.html +9 -9
- package/docs/interfaces/LDAIMetrics.html +6 -6
- package/docs/interfaces/LDJudge.html +6 -6
- package/docs/interfaces/LDJudgeConfiguration.html +5 -5
- package/docs/interfaces/LDLogger.html +3 -3
- package/docs/interfaces/LDMessage.html +6 -6
- package/docs/interfaces/LDModelConfig.html +7 -7
- package/docs/interfaces/LDProviderConfig.html +5 -5
- package/docs/interfaces/LDTokenUsage.html +7 -7
- package/docs/interfaces/StructuredResponse.html +7 -7
- package/docs/types/LDAIConfigDefaultKind.html +4 -4
- package/docs/types/LDAIConfigKind.html +4 -4
- package/docs/types/LDAIConfigMode.html +4 -4
- package/docs/types/SupportedAIProvider.html +4 -4
- package/docs/variables/SUPPORTED_AI_PROVIDERS.html +4 -4
- package/package.json +1 -1
- package/src/LDAIClientImpl.ts +2 -2
- package/src/LDAIConfigTrackerImpl.ts +12 -2
- package/src/api/chat/TrackedChat.ts +9 -5
- package/src/api/config/LDAIConfigTracker.ts +8 -1
- package/src/api/config/LDAIConfigUtils.ts +20 -9
- package/src/api/config/types.ts +4 -0
- package/src/api/judge/Judge.ts +2 -0
- package/src/api/judge/types.ts +2 -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.14.
|
|
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.14.1</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.14.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.14.1</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">
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<li><a href="LDAICompletionConfig.html" class="tsd-signature-type tsd-kind-interface">LDAICompletionConfig</a></li>
|
|
31
31
|
<li><a href="LDAIJudgeConfig.html" class="tsd-signature-type tsd-kind-interface">LDAIJudgeConfig</a></li></ul></li></ul></li></ul></section><aside class="tsd-sources">
|
|
32
32
|
<ul>
|
|
33
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
33
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L97">sdk/server-ai/src/api/config/types.ts:97</a></li></ul></aside>
|
|
34
34
|
<section class="tsd-panel-group tsd-index-group">
|
|
35
35
|
<section class="tsd-panel tsd-index-panel">
|
|
36
36
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
<section class="tsd-index-section">
|
|
40
40
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
41
41
|
<div class="tsd-index-list"><a href="LDAIConfig.html#enabled" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>enabled</span></a>
|
|
42
|
+
<a href="LDAIConfig.html#key" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>key</span></a>
|
|
42
43
|
<a href="LDAIConfig.html#model" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>model?</span></a>
|
|
43
44
|
<a href="LDAIConfig.html#provider" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>provider?</span></a>
|
|
44
45
|
<a href="LDAIConfig.html#tracker" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>tracker?</span></a>
|
|
@@ -52,7 +53,15 @@
|
|
|
52
53
|
</div>
|
|
53
54
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
54
55
|
<ul>
|
|
55
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
56
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L105">sdk/server-ai/src/api/config/types.ts:105</a></li></ul></aside></section>
|
|
57
|
+
<section class="tsd-panel tsd-member"><a id="key" class="tsd-anchor"></a>
|
|
58
|
+
<h3 class="tsd-anchor-link"><span>key</span><a href="#key" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
59
|
+
<div class="tsd-signature"><span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
|
60
|
+
<div class="tsd-comment tsd-typography"><p>The key of the AI Config.</p>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
63
|
+
<ul>
|
|
64
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L101">sdk/server-ai/src/api/config/types.ts:101</a></li></ul></aside></section>
|
|
56
65
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="model" class="tsd-anchor"></a>
|
|
57
66
|
<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>
|
|
58
67
|
<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>
|
|
@@ -61,7 +70,7 @@
|
|
|
61
70
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
62
71
|
<p>Inherited from Omit.model</p>
|
|
63
72
|
<ul>
|
|
64
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
73
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L81">sdk/server-ai/src/api/config/types.ts:81</a></li></ul></aside></section>
|
|
65
74
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="provider" class="tsd-anchor"></a>
|
|
66
75
|
<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>
|
|
67
76
|
<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>
|
|
@@ -70,7 +79,7 @@
|
|
|
70
79
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
71
80
|
<p>Inherited from Omit.provider</p>
|
|
72
81
|
<ul>
|
|
73
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
82
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L86">sdk/server-ai/src/api/config/types.ts:86</a></li></ul></aside></section>
|
|
74
83
|
<section class="tsd-panel tsd-member"><a id="tracker" class="tsd-anchor"></a>
|
|
75
84
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <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>
|
|
76
85
|
<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>
|
|
@@ -79,7 +88,7 @@ Undefined for disabled configs.</p>
|
|
|
79
88
|
</div>
|
|
80
89
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
81
90
|
<ul>
|
|
82
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
91
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L111">sdk/server-ai/src/api/config/types.ts:111</a></li></ul></aside></section></section></div>
|
|
83
92
|
<div class="col-sidebar">
|
|
84
93
|
<div class="page-menu">
|
|
85
94
|
<div class="tsd-navigation settings">
|
|
@@ -100,11 +109,12 @@ Undefined for disabled configs.</p>
|
|
|
100
109
|
<div class="tsd-accordion-details">
|
|
101
110
|
<ul>
|
|
102
111
|
<li><a href="#enabled" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>enabled</span></a></li>
|
|
112
|
+
<li><a href="#key" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>key</span></a></li>
|
|
103
113
|
<li><a href="#model" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>model</span></a></li>
|
|
104
114
|
<li><a href="#provider" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>provider</span></a></li>
|
|
105
115
|
<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>
|
|
106
116
|
<div class="site-menu">
|
|
107
|
-
<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.14.
|
|
117
|
+
<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.14.1</span></a>
|
|
108
118
|
<ul class="tsd-small-nested-navigation">
|
|
109
119
|
<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>
|
|
110
120
|
<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>
|
|
@@ -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>LDAIConfigDefault | @launchdarkly/server-sdk-ai - v0.14.
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDAIConfigDefault | @launchdarkly/server-sdk-ai - v0.14.1</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.14.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.14.1</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">
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<li><a href="LDAICompletionConfigDefault.html" class="tsd-signature-type tsd-kind-interface">LDAICompletionConfigDefault</a></li>
|
|
29
29
|
<li><a href="LDAIJudgeConfigDefault.html" class="tsd-signature-type tsd-kind-interface">LDAIJudgeConfigDefault</a></li></ul></li></ul></section><aside class="tsd-sources">
|
|
30
30
|
<ul>
|
|
31
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
31
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L77">sdk/server-ai/src/api/config/types.ts:77</a></li></ul></aside>
|
|
32
32
|
<section class="tsd-panel-group tsd-index-group">
|
|
33
33
|
<section class="tsd-panel tsd-index-panel">
|
|
34
34
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
</div>
|
|
50
50
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
51
51
|
<ul>
|
|
52
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
52
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L91">sdk/server-ai/src/api/config/types.ts:91</a></li></ul></aside></section>
|
|
53
53
|
<section class="tsd-panel tsd-member"><a id="model" class="tsd-anchor"></a>
|
|
54
54
|
<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>
|
|
55
55
|
<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>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
</div>
|
|
58
58
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
59
59
|
<ul>
|
|
60
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
60
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L81">sdk/server-ai/src/api/config/types.ts:81</a></li></ul></aside></section>
|
|
61
61
|
<section class="tsd-panel tsd-member"><a id="provider" class="tsd-anchor"></a>
|
|
62
62
|
<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>
|
|
63
63
|
<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>
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</div>
|
|
66
66
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
67
67
|
<ul>
|
|
68
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
68
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/types.ts#L86">sdk/server-ai/src/api/config/types.ts:86</a></li></ul></aside></section></section></div>
|
|
69
69
|
<div class="col-sidebar">
|
|
70
70
|
<div class="page-menu">
|
|
71
71
|
<div class="tsd-navigation settings">
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
<li><a href="#model" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>model</span></a></li>
|
|
90
90
|
<li><a href="#provider" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>provider</span></a></li></ul></div></details></div>
|
|
91
91
|
<div class="site-menu">
|
|
92
|
-
<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.14.
|
|
92
|
+
<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.14.1</span></a>
|
|
93
93
|
<ul class="tsd-small-nested-navigation">
|
|
94
94
|
<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>
|
|
95
95
|
<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>
|
|
@@ -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.14.
|
|
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.14.1</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.14.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.14.1</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/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L37">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:37</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#trackError" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Error</span></a>
|
|
41
41
|
<a href="LDAIConfigTracker.html#trackEvalScores" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Eval<wbr/>Scores</span></a>
|
|
42
42
|
<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>
|
|
43
|
+
<a href="LDAIConfigTracker.html#trackJudgeResponse" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Judge<wbr/>Response</span></a>
|
|
43
44
|
<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>
|
|
44
45
|
<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>
|
|
45
46
|
<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>
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">LDAIMetricSummary</span></h4>
|
|
61
62
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
62
63
|
<ul>
|
|
63
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
64
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L237">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:237</a></li></ul></aside></li></ul></section>
|
|
64
65
|
<section class="tsd-panel tsd-member"><a id="getTrackData" class="tsd-anchor"></a>
|
|
65
66
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Track<wbr/>Data</span><a href="#getTrackData" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
66
67
|
<ul class="tsd-signatures">
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
<h5><span class="tsd-kind-property">version</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul>
|
|
87
88
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
88
89
|
<ul>
|
|
89
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
90
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L41">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:41</a></li></ul></aside></li></ul></section>
|
|
90
91
|
<section class="tsd-panel tsd-member"><a id="trackBedrockConverseMetrics" class="tsd-anchor"></a>
|
|
91
92
|
<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>
|
|
92
93
|
<ul class="tsd-signatures">
|
|
@@ -111,7 +112,7 @@
|
|
|
111
112
|
|
|
112
113
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
113
114
|
<ul>
|
|
114
|
-
<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/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L194">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:194</a></li></ul></aside></li></ul></section>
|
|
115
116
|
<section class="tsd-panel tsd-member"><a id="trackDuration" class="tsd-anchor"></a>
|
|
116
117
|
<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>
|
|
117
118
|
<ul class="tsd-signatures">
|
|
@@ -130,7 +131,7 @@
|
|
|
130
131
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
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/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L57">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:57</a></li></ul></aside></li></ul></section>
|
|
134
135
|
<section class="tsd-panel tsd-member"><a id="trackDurationOf" class="tsd-anchor"></a>
|
|
135
136
|
<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>
|
|
136
137
|
<ul class="tsd-signatures">
|
|
@@ -158,7 +159,7 @@ In the case the provided function throws, this function will still record the du
|
|
|
158
159
|
|
|
159
160
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
160
161
|
<ul>
|
|
161
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
162
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L115">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:115</a></li></ul></aside></li></ul></section>
|
|
162
163
|
<section class="tsd-panel tsd-member"><a id="trackError" class="tsd-anchor"></a>
|
|
163
164
|
<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>
|
|
164
165
|
<ul class="tsd-signatures">
|
|
@@ -169,7 +170,7 @@ In the case the provided function throws, this function will still record the du
|
|
|
169
170
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
170
171
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
171
172
|
<ul>
|
|
172
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
173
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L74">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:74</a></li></ul></aside></li></ul></section>
|
|
173
174
|
<section class="tsd-panel tsd-member"><a id="trackEvalScores" class="tsd-anchor"></a>
|
|
174
175
|
<h3 class="tsd-anchor-link"><span>track<wbr/>Eval<wbr/>Scores</span><a href="#trackEvalScores" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
175
176
|
<ul class="tsd-signatures">
|
|
@@ -187,7 +188,7 @@ In the case the provided function throws, this function will still record the du
|
|
|
187
188
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
188
189
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
189
190
|
<ul>
|
|
190
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
191
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L95">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:95</a></li></ul></aside></li></ul></section>
|
|
191
192
|
<section class="tsd-panel tsd-member"><a id="trackFeedback" class="tsd-anchor"></a>
|
|
192
193
|
<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>
|
|
193
194
|
<ul class="tsd-signatures">
|
|
@@ -208,7 +209,25 @@ In the case the provided function throws, this function will still record the du
|
|
|
208
209
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
209
210
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
210
211
|
<ul>
|
|
211
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
212
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L81">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:81</a></li></ul></aside></li></ul></section>
|
|
213
|
+
<section class="tsd-panel tsd-member"><a id="trackJudgeResponse" class="tsd-anchor"></a>
|
|
214
|
+
<h3 class="tsd-anchor-link"><span>track<wbr/>Judge<wbr/>Response</span><a href="#trackJudgeResponse" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
215
|
+
<ul class="tsd-signatures">
|
|
216
|
+
<li class="tsd-signature tsd-anchor-link" id="trackJudgeResponse.trackJudgeResponse-1"><span class="tsd-kind-call-signature">track<wbr/>Judge<wbr/>Response</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">response</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#trackJudgeResponse.trackJudgeResponse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
217
|
+
<li class="tsd-description">
|
|
218
|
+
<div class="tsd-comment tsd-typography"><p>Track a judge response containing evaluation scores and judge configuration key.</p>
|
|
219
|
+
</div>
|
|
220
|
+
<div class="tsd-parameters">
|
|
221
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
222
|
+
<ul class="tsd-parameter-list">
|
|
223
|
+
<li>
|
|
224
|
+
<h5><span class="tsd-kind-parameter">response</span>: <a href="JudgeResponse.html" class="tsd-signature-type tsd-kind-interface">JudgeResponse</a></h5>
|
|
225
|
+
<div class="tsd-comment tsd-typography"><p>Judge response containing evaluation scores and judge configuration key</p>
|
|
226
|
+
</div></li></ul></div>
|
|
227
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
228
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
229
|
+
<ul>
|
|
230
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L102">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:102</a></li></ul></aside></li></ul></section>
|
|
212
231
|
<section class="tsd-panel tsd-member"><a id="trackMetricsOf" class="tsd-anchor"></a>
|
|
213
232
|
<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>
|
|
214
233
|
<ul class="tsd-signatures">
|
|
@@ -258,7 +277,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
258
277
|
|
|
259
278
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
260
279
|
<ul>
|
|
261
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
280
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L131">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:131</a></li></ul></aside></li></ul></section>
|
|
262
281
|
<section class="tsd-panel tsd-member"><a id="trackOpenAIMetrics" class="tsd-anchor"></a>
|
|
263
282
|
<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>
|
|
264
283
|
<ul class="tsd-signatures">
|
|
@@ -292,7 +311,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
292
311
|
|
|
293
312
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
294
313
|
<ul>
|
|
295
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
314
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L174">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:174</a></li></ul></aside></li></ul></section>
|
|
296
315
|
<section class="tsd-panel tsd-member"><a id="trackStreamMetricsOf" class="tsd-anchor"></a>
|
|
297
316
|
<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>
|
|
298
317
|
<ul class="tsd-signatures">
|
|
@@ -349,7 +368,7 @@ If metrics extraction fails, the error is logged but does not affect stream cons
|
|
|
349
368
|
|
|
350
369
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
351
370
|
<ul>
|
|
352
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
371
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L157">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:157</a></li></ul></aside></li></ul></section>
|
|
353
372
|
<section class="tsd-panel tsd-member"><a id="trackSuccess" class="tsd-anchor"></a>
|
|
354
373
|
<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>
|
|
355
374
|
<ul class="tsd-signatures">
|
|
@@ -360,7 +379,7 @@ If metrics extraction fails, the error is logged but does not affect stream cons
|
|
|
360
379
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
361
380
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
362
381
|
<ul>
|
|
363
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
382
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L69">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:69</a></li></ul></aside></li></ul></section>
|
|
364
383
|
<section class="tsd-panel tsd-member"><a id="trackTimeToFirstToken" class="tsd-anchor"></a>
|
|
365
384
|
<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>
|
|
366
385
|
<ul class="tsd-signatures">
|
|
@@ -378,7 +397,7 @@ If metrics extraction fails, the error is logged but does not affect stream cons
|
|
|
378
397
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
379
398
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
380
399
|
<ul>
|
|
381
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
400
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/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>
|
|
382
401
|
<section class="tsd-panel tsd-member"><a id="trackTokens" class="tsd-anchor"></a>
|
|
383
402
|
<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>
|
|
384
403
|
<ul class="tsd-signatures">
|
|
@@ -396,7 +415,7 @@ If metrics extraction fails, the error is logged but does not affect stream cons
|
|
|
396
415
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
397
416
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
398
417
|
<ul>
|
|
399
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
418
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L64">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:64</a></li></ul></aside></li></ul></section>
|
|
400
419
|
<section class="tsd-panel tsd-member"><a id="trackVercelAISDKGenerateTextMetrics" class="tsd-anchor"></a>
|
|
401
420
|
<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>
|
|
402
421
|
<ul class="tsd-signatures">
|
|
@@ -430,7 +449,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
430
449
|
|
|
431
450
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
432
451
|
<ul>
|
|
433
|
-
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/
|
|
452
|
+
<li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f40a435/packages/sdk/server-ai/src/api/config/LDAIConfigTracker.ts#L220">sdk/server-ai/src/api/config/LDAIConfigTracker.ts:220</a></li></ul></aside></li></ul></section></section></div>
|
|
434
453
|
<div class="col-sidebar">
|
|
435
454
|
<div class="page-menu">
|
|
436
455
|
<div class="tsd-navigation settings">
|
|
@@ -458,6 +477,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
458
477
|
<li><a href="#trackError" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Error</span></a></li>
|
|
459
478
|
<li><a href="#trackEvalScores" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Eval<wbr/>Scores</span></a></li>
|
|
460
479
|
<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>
|
|
480
|
+
<li><a href="#trackJudgeResponse" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>track<wbr/>Judge<wbr/>Response</span></a></li>
|
|
461
481
|
<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>
|
|
462
482
|
<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>
|
|
463
483
|
<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>
|
|
@@ -466,7 +486,7 @@ A failed operation will not have any token usage data.</p>
|
|
|
466
486
|
<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>
|
|
467
487
|
<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></ul></div></details></div>
|
|
468
488
|
<div class="site-menu">
|
|
469
|
-
<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.14.
|
|
489
|
+
<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.14.1</span></a>
|
|
470
490
|
<ul class="tsd-small-nested-navigation">
|
|
471
491
|
<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>
|
|
472
492
|
<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>
|