@launchdarkly/server-sdk-ai 0.12.0 → 0.12.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.12.1](https://github.com/launchdarkly/js-core/compare/server-sdk-ai-v0.12.0...server-sdk-ai-v0.12.1) (2025-10-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Improve documentation for AI SDK and AIProvider ([#958](https://github.com/launchdarkly/js-core/issues/958)) ([17d595a](https://github.com/launchdarkly/js-core/commit/17d595aff301998030cfb62724b8eb37fea9adbf))
9
+
3
10
  ## [0.12.0](https://github.com/launchdarkly/js-core/compare/server-sdk-ai-v0.11.4...server-sdk-ai-v0.12.0) (2025-10-13)
4
11
 
5
12
 
package/README.md CHANGED
@@ -27,6 +27,8 @@ This assumes that you have already installed the LaunchDarkly Node.js (server-si
27
27
 
28
28
  ```shell
29
29
  npm install @launchdarkly/server-sdk-ai --save
30
+ # or
31
+ yarn add @launchdarkly/server-sdk-ai
30
32
  ```
31
33
 
32
34
  2. Create an AI SDK instance:
@@ -36,18 +38,138 @@ npm install @launchdarkly/server-sdk-ai --save
36
38
  const aiClient = initAi(ldClient);
37
39
  ```
38
40
 
39
- 3. Evaluate a model configuration:
41
+ ## Setting Default AI Configurations
42
+
43
+ When retrieving AI configurations, you need to provide default values that will be used if the configuration is not available from LaunchDarkly:
44
+
45
+ ### Fully Configured Default
46
+
47
+ ```typescript
48
+ const defaultConfig = {
49
+ enabled: true,
50
+ model: {
51
+ name: 'gpt-4',
52
+ parameters: { temperature: 0.7, maxTokens: 1000 }
53
+ },
54
+ messages: [
55
+ { role: 'system', content: 'You are a helpful assistant.' }
56
+ ]
57
+ };
58
+ ```
59
+
60
+ ### Disabled Default
61
+
62
+ ```typescript
63
+ const defaultConfig = {
64
+ enabled: false
65
+ };
66
+ ```
67
+
68
+ ## Retrieving AI Configurations
69
+
70
+ The `config` method retrieves AI configurations from LaunchDarkly with support for dynamic variables and fallback values:
71
+
72
+ ```typescript
73
+ const aiConfig = await aiClient.config(
74
+ aiConfigKey,
75
+ context,
76
+ defaultConfig,
77
+ { myVariable: 'My User Defined Variable' } // Variables for template interpolation
78
+ );
79
+
80
+ // Ensure configuration is enabled
81
+ if (aiConfig.enabled) {
82
+ const { messages, model, tracker } = aiConfig;
83
+ // Use with your AI provider
84
+ }
85
+ ```
86
+
87
+ ## TrackedChat for Conversational AI
88
+
89
+ `TrackedChat` provides a high-level interface for conversational AI with automatic conversation management and metrics tracking:
90
+
91
+ - Automatically configures models based on AI configuration
92
+ - Maintains conversation history across multiple interactions
93
+ - Automatically tracks token usage, latency, and success rates
94
+ - Works with any supported AI provider (see [AI Providers](https://github.com/launchdarkly/js-core#ai-providers) for available packages)
95
+
96
+ ### Using TrackedChat
40
97
 
41
98
  ```typescript
42
- const config = await aiClient.config(
43
- aiConfigKey!,
99
+ // Use the same defaultConfig from the retrieval section above
100
+ const chat = await aiClient.initChat(
101
+ 'customer-support-chat',
44
102
  context,
45
- { enabled: false },
46
- { myVariable: 'My User Defined Variable' },
103
+ defaultConfig,
104
+ { customerName: 'John' }
47
105
  );
106
+
107
+ if (chat) {
108
+ // Simple conversation flow - metrics are automatically tracked by invoke()
109
+ const response1 = await chat.invoke('I need help with my order');
110
+ console.log(response1.message.content);
111
+
112
+ const response2 = await chat.invoke("What's the status?");
113
+ console.log(response2.message.content);
114
+
115
+ // Access conversation history
116
+ const messages = chat.getMessages();
117
+ console.log(`Conversation has ${messages.length} messages`);
118
+ }
48
119
  ```
49
120
 
50
- For an example of how to use the config please refer to the examples folder.
121
+ ## Advanced Usage with Providers
122
+
123
+ For more control, you can use the configuration directly with AI providers. We recommend using [LaunchDarkly AI Provider packages](https://github.com/launchdarkly/js-core#ai-providers) when available:
124
+
125
+ ### Using AI Provider Packages
126
+
127
+ ```typescript
128
+ import { LangChainProvider } from '@launchdarkly/server-sdk-ai-langchain';
129
+
130
+ const aiConfig = await aiClient.config(aiConfigKey, context, defaultValue);
131
+
132
+ // Create LangChain model from configuration
133
+ const llm = await LangChainProvider.createLangChainModel(aiConfig);
134
+
135
+ // Use with tracking
136
+ const response = await aiConfig.tracker.trackMetricsOf(
137
+ (result) => LangChainProvider.createAIMetrics(result),
138
+ () => llm.invoke(messages)
139
+ );
140
+
141
+ console.log('AI Response:', response.content);
142
+ ```
143
+
144
+ ### Using Custom Providers
145
+
146
+ ```typescript
147
+ import { LDAIMetrics } from '@launchdarkly/server-sdk-ai';
148
+
149
+ const aiConfig = await aiClient.config(aiConfigKey, context, defaultValue);
150
+
151
+ // Define custom metrics mapping for your provider
152
+ const mapCustomProviderMetrics = (response: any): LDAIMetrics => ({
153
+ success: true,
154
+ usage: {
155
+ total: response.usage?.total_tokens || 0,
156
+ input: response.usage?.prompt_tokens || 0,
157
+ output: response.usage?.completion_tokens || 0,
158
+ }
159
+ });
160
+
161
+ // Use with custom provider and tracking
162
+ const result = await aiConfig.tracker.trackMetricsOf(
163
+ mapCustomProviderMetrics,
164
+ () => customProvider.generate({
165
+ messages: aiConfig.messages || [],
166
+ model: aiConfig.model?.name || 'custom-model',
167
+ temperature: aiConfig.model?.parameters?.temperature ?? 0.5,
168
+ })
169
+ );
170
+
171
+ console.log('AI Response:', result.content);
172
+ ```
51
173
 
52
174
  ## Contributing
53
175
 
@@ -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>AIProvider | @launchdarkly/server-sdk-ai - v0.12.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">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AIProvider | @launchdarkly/server-sdk-ai - v0.12.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.12.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.12.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 @@ for better extensibility and backwards compatibility.</p>
28
28
  <ul class="tsd-hierarchy">
29
29
  <li><span class="target">AIProvider</span></li></ul></section><aside class="tsd-sources">
30
30
  <ul>
31
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L14">api/providers/AIProvider.ts:14</a></li></ul></aside>
31
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L14">api/providers/AIProvider.ts:14</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">
@@ -61,14 +61,14 @@ for better extensibility and backwards compatibility.</p>
61
61
  <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">logger</span>: <span class="tsd-signature-type ">LDLogger</span></h5><code class="tsd-tag ts-flagOptional">Optional</code> </li></ul></div>
62
62
  <h4 class="tsd-returns-title">Returns <a href="AIProvider.html" class="tsd-signature-type tsd-kind-class">AIProvider</a></h4><aside class="tsd-sources">
63
63
  <ul>
64
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L17">api/providers/AIProvider.ts:17</a></li></ul></aside></li></ul></section></section>
64
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L17">api/providers/AIProvider.ts:17</a></li></ul></aside></li></ul></section></section>
65
65
  <section class="tsd-panel-group tsd-member-group">
66
66
  <h2>Properties</h2>
67
67
  <section class="tsd-panel tsd-member tsd-is-protected"><a id="logger" class="tsd-anchor"></a>
68
68
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>logger</span><a href="#logger" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
69
69
  <div class="tsd-signature"><span class="tsd-kind-property">logger</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type ">LDLogger</span></div><aside class="tsd-sources">
70
70
  <ul>
71
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L15">api/providers/AIProvider.ts:15</a></li></ul></aside></section></section>
71
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L15">api/providers/AIProvider.ts:15</a></li></ul></aside></section></section>
72
72
  <section class="tsd-panel-group tsd-member-group">
73
73
  <h2>Methods</h2>
74
74
  <section class="tsd-panel tsd-member"><a id="invokeModel" class="tsd-anchor"></a>
@@ -91,7 +91,7 @@ and return a ChatResponse with the result and metrics.</p>
91
91
 
92
92
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
93
93
  <ul>
94
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L28">api/providers/AIProvider.ts:28</a></li></ul></aside></li></ul></section>
94
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L28">api/providers/AIProvider.ts:28</a></li></ul></aside></li></ul></section>
95
95
  <section class="tsd-panel tsd-member"><a id="create" class="tsd-anchor"></a>
96
96
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>create</span><a href="#create" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
97
97
  <ul class="tsd-signatures">
@@ -116,7 +116,7 @@ that accepts an AIConfig and returns a configured instance.</p>
116
116
 
117
117
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
118
118
  <ul>
119
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L40">api/providers/AIProvider.ts:40</a></li></ul></aside></li></ul></section></section></div>
119
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProvider.ts#L40">api/providers/AIProvider.ts:40</a></li></ul></aside></li></ul></section></section></div>
120
120
  <div class="col-sidebar">
121
121
  <div class="page-menu">
122
122
  <div class="tsd-navigation settings">
@@ -141,7 +141,7 @@ that accepts an AIConfig and returns a configured instance.</p>
141
141
  <li><a href="#invokeModel" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>invoke<wbr/>Model</span></a></li>
142
142
  <li><a href="#create" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create</span></a></li></ul></div></details></div>
143
143
  <div class="site-menu">
144
- <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.12.0</span></a>
144
+ <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.12.1</span></a>
145
145
  <ul class="tsd-small-nested-navigation">
146
146
  <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>
147
147
  <li><a href="AIProvider.html" class="current"><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>AIProviderFactory | @launchdarkly/server-sdk-ai - v0.12.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">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AIProviderFactory | @launchdarkly/server-sdk-ai - v0.12.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.12.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.12.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">AIProviderFactory</span></li></ul></section><aside class="tsd-sources">
26
26
  <ul>
27
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L24">api/providers/AIProviderFactory.ts:24</a></li></ul></aside>
27
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L24">api/providers/AIProviderFactory.ts:24</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">
@@ -72,7 +72,7 @@
72
72
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="AIProvider.html" class="tsd-signature-type tsd-kind-class">AIProvider</a><span class="tsd-signature-symbol">&gt;</span></h4>
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/ea50d19/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L127">api/providers/AIProviderFactory.ts:127</a></li></ul></aside></li></ul></section>
75
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L127">api/providers/AIProviderFactory.ts:127</a></li></ul></aside></li></ul></section>
76
76
  <section class="tsd-panel tsd-member tsd-is-private"><a id="_getProvidersToTry" class="tsd-anchor"></a>
77
77
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>_get<wbr/>Providers<wbr/>To<wbr/>Try</span><a href="#_getProvidersToTry" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
78
78
  <ul class="tsd-signatures tsd-is-private">
@@ -90,7 +90,7 @@
90
90
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">&quot;openai&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;langchain&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;vercel&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4>
91
91
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
92
92
  <ul>
93
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L63">api/providers/AIProviderFactory.ts:63</a></li></ul></aside></li></ul></section>
93
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L63">api/providers/AIProviderFactory.ts:63</a></li></ul></aside></li></ul></section>
94
94
  <section class="tsd-panel tsd-member tsd-is-private"><a id="_tryCreateProvider" class="tsd-anchor"></a>
95
95
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagPrivate">Private</code> <span>_try<wbr/>Create<wbr/>Provider</span><a href="#_tryCreateProvider" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
96
96
  <ul class="tsd-signatures tsd-is-private">
@@ -110,7 +110,7 @@
110
110
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="AIProvider.html" class="tsd-signature-type tsd-kind-class">AIProvider</a><span class="tsd-signature-symbol">&gt;</span></h4>
111
111
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
112
112
  <ul>
113
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L92">api/providers/AIProviderFactory.ts:92</a></li></ul></aside></li></ul></section>
113
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L92">api/providers/AIProviderFactory.ts:92</a></li></ul></aside></li></ul></section>
114
114
  <section class="tsd-panel tsd-member"><a id="create" class="tsd-anchor"></a>
115
115
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>create</span><a href="#create" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
116
116
  <ul class="tsd-signatures">
@@ -138,7 +138,7 @@ Returns undefined if the provider is not supported.</p>
138
138
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="AIProvider.html" class="tsd-signature-type tsd-kind-class">AIProvider</a><span class="tsd-signature-symbol">&gt;</span></h4>
139
139
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
140
140
  <ul>
141
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L34">api/providers/AIProviderFactory.ts:34</a></li></ul></aside></li></ul></section></section></div>
141
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/providers/AIProviderFactory.ts#L34">api/providers/AIProviderFactory.ts:34</a></li></ul></aside></li></ul></section></section></div>
142
142
  <div class="col-sidebar">
143
143
  <div class="page-menu">
144
144
  <div class="tsd-navigation settings">
@@ -164,7 +164,7 @@ Returns undefined if the provider is not supported.</p>
164
164
  <li><a href="#_tryCreateProvider" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_try<wbr/>Create<wbr/>Provider</span></a></li>
165
165
  <li><a href="#create" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create</span></a></li></ul></div></details></div>
166
166
  <div class="site-menu">
167
- <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.12.0</span></a>
167
+ <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.12.1</span></a>
168
168
  <ul class="tsd-small-nested-navigation">
169
169
  <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>
170
170
  <li><a href="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>TrackedChat | @launchdarkly/server-sdk-ai - v0.12.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">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>TrackedChat | @launchdarkly/server-sdk-ai - v0.12.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.12.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.12.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">
@@ -27,7 +27,7 @@ the actual model invocation to the provider.</p>
27
27
  <ul class="tsd-hierarchy">
28
28
  <li><span class="target">TrackedChat</span></li></ul></section><aside class="tsd-sources">
29
29
  <ul>
30
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L12">api/chat/TrackedChat.ts:12</a></li></ul></aside>
30
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L12">api/chat/TrackedChat.ts:12</a></li></ul></aside>
31
31
  <section class="tsd-panel-group tsd-index-group">
32
32
  <section class="tsd-panel tsd-index-panel">
33
33
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -71,29 +71,29 @@ the actual model invocation to the provider.</p>
71
71
  <h5><span class="tsd-kind-parameter">provider</span>: <a href="AIProvider.html" class="tsd-signature-type tsd-kind-class">AIProvider</a></h5></li></ul></div>
72
72
  <h4 class="tsd-returns-title">Returns <a href="TrackedChat.html" class="tsd-signature-type tsd-kind-class">TrackedChat</a></h4><aside class="tsd-sources">
73
73
  <ul>
74
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L15">api/chat/TrackedChat.ts:15</a></li></ul></aside></li></ul></section></section>
74
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L15">api/chat/TrackedChat.ts:15</a></li></ul></aside></li></ul></section></section>
75
75
  <section class="tsd-panel-group tsd-member-group">
76
76
  <h2>Properties</h2>
77
77
  <section class="tsd-panel tsd-member tsd-is-protected"><a id="aiConfig" class="tsd-anchor"></a>
78
78
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>ai<wbr/>Config</span><a href="#aiConfig" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
79
79
  <div class="tsd-signature"><span class="tsd-kind-property">ai<wbr/>Config</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/LDAIConfig.html" class="tsd-signature-type tsd-kind-interface">LDAIConfig</a></div><aside class="tsd-sources">
80
80
  <ul>
81
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L16">api/chat/TrackedChat.ts:16</a></li></ul></aside></section>
81
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L16">api/chat/TrackedChat.ts:16</a></li></ul></aside></section>
82
82
  <section class="tsd-panel tsd-member tsd-is-protected"><a id="messages" class="tsd-anchor"></a>
83
83
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</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>
84
84
  <div class="tsd-signature"><span class="tsd-kind-property">messages</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/LDMessage.html" class="tsd-signature-type tsd-kind-interface">LDMessage</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources">
85
85
  <ul>
86
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L13">api/chat/TrackedChat.ts:13</a></li></ul></aside></section>
86
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L13">api/chat/TrackedChat.ts:13</a></li></ul></aside></section>
87
87
  <section class="tsd-panel tsd-member tsd-is-protected"><a id="provider" class="tsd-anchor"></a>
88
88
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagReadonly">Readonly</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>
89
89
  <div class="tsd-signature"><span class="tsd-kind-property">provider</span><span class="tsd-signature-symbol">:</span> <a href="AIProvider.html" class="tsd-signature-type tsd-kind-class">AIProvider</a></div><aside class="tsd-sources">
90
90
  <ul>
91
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L18">api/chat/TrackedChat.ts:18</a></li></ul></aside></section>
91
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L18">api/chat/TrackedChat.ts:18</a></li></ul></aside></section>
92
92
  <section class="tsd-panel tsd-member tsd-is-protected"><a id="tracker" class="tsd-anchor"></a>
93
93
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagReadonly">Readonly</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>
94
94
  <div class="tsd-signature"><span class="tsd-kind-property">tracker</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/LDAIConfigTracker.html" class="tsd-signature-type tsd-kind-interface">LDAIConfigTracker</a></div><aside class="tsd-sources">
95
95
  <ul>
96
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L17">api/chat/TrackedChat.ts:17</a></li></ul></aside></section></section>
96
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L17">api/chat/TrackedChat.ts:17</a></li></ul></aside></section></section>
97
97
  <section class="tsd-panel-group tsd-member-group">
98
98
  <h2>Methods</h2>
99
99
  <section class="tsd-panel tsd-member"><a id="appendMessages" class="tsd-anchor"></a>
@@ -115,7 +115,7 @@ which is useful for managing multi-turn conversations or injecting context.</p>
115
115
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
116
116
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
117
117
  <ul>
118
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L80">api/chat/TrackedChat.ts:80</a></li></ul></aside></li></ul></section>
118
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L80">api/chat/TrackedChat.ts:80</a></li></ul></aside></li></ul></section>
119
119
  <section class="tsd-panel tsd-member"><a id="getConfig" class="tsd-anchor"></a>
120
120
  <h3 class="tsd-anchor-link"><span>get<wbr/>Config</span><a href="#getConfig" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
121
121
  <ul class="tsd-signatures">
@@ -126,7 +126,7 @@ which is useful for managing multi-turn conversations or injecting context.</p>
126
126
  <h4 class="tsd-returns-title">Returns <a href="../interfaces/LDAIConfig.html" class="tsd-signature-type tsd-kind-interface">LDAIConfig</a></h4>
127
127
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
128
128
  <ul>
129
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L54">api/chat/TrackedChat.ts:54</a></li></ul></aside></li></ul></section>
129
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L54">api/chat/TrackedChat.ts:54</a></li></ul></aside></li></ul></section>
130
130
  <section class="tsd-panel tsd-member"><a id="getMessages" class="tsd-anchor"></a>
131
131
  <h3 class="tsd-anchor-link"><span>get<wbr/>Messages</span><a href="#getMessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
132
132
  <ul class="tsd-signatures">
@@ -148,7 +148,7 @@ which is useful for managing multi-turn conversations or injecting context.</p>
148
148
 
149
149
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
150
150
  <ul>
151
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L93">api/chat/TrackedChat.ts:93</a></li></ul></aside></li></ul></section>
151
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L93">api/chat/TrackedChat.ts:93</a></li></ul></aside></li></ul></section>
152
152
  <section class="tsd-panel tsd-member"><a id="getProvider" class="tsd-anchor"></a>
153
153
  <h3 class="tsd-anchor-link"><span>get<wbr/>Provider</span><a href="#getProvider" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
154
154
  <ul class="tsd-signatures">
@@ -160,7 +160,7 @@ This provides direct access to the provider for advanced use cases.</p>
160
160
  <h4 class="tsd-returns-title">Returns <a href="AIProvider.html" class="tsd-signature-type tsd-kind-class">AIProvider</a></h4>
161
161
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
162
162
  <ul>
163
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L69">api/chat/TrackedChat.ts:69</a></li></ul></aside></li></ul></section>
163
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L69">api/chat/TrackedChat.ts:69</a></li></ul></aside></li></ul></section>
164
164
  <section class="tsd-panel tsd-member"><a id="getTracker" class="tsd-anchor"></a>
165
165
  <h3 class="tsd-anchor-link"><span>get<wbr/>Tracker</span><a href="#getTracker" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
166
166
  <ul class="tsd-signatures">
@@ -171,7 +171,7 @@ This provides direct access to the provider for advanced use cases.</p>
171
171
  <h4 class="tsd-returns-title">Returns <a href="../interfaces/LDAIConfigTracker.html" class="tsd-signature-type tsd-kind-interface">LDAIConfigTracker</a></h4>
172
172
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
173
173
  <ul>
174
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L61">api/chat/TrackedChat.ts:61</a></li></ul></aside></li></ul></section>
174
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L61">api/chat/TrackedChat.ts:61</a></li></ul></aside></li></ul></section>
175
175
  <section class="tsd-panel tsd-member"><a id="invoke" class="tsd-anchor"></a>
176
176
  <h3 class="tsd-anchor-link"><span>invoke</span><a href="#invoke" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
177
177
  <ul class="tsd-signatures">
@@ -188,7 +188,7 @@ This method handles conversation management and tracking, delegating to the prov
188
188
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/ChatResponse.html" class="tsd-signature-type tsd-kind-interface">ChatResponse</a><span class="tsd-signature-symbol">&gt;</span></h4>
189
189
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
190
190
  <ul>
191
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L27">api/chat/TrackedChat.ts:27</a></li></ul></aside></li></ul></section></section></div>
191
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/chat/TrackedChat.ts#L27">api/chat/TrackedChat.ts:27</a></li></ul></aside></li></ul></section></section></div>
192
192
  <div class="col-sidebar">
193
193
  <div class="page-menu">
194
194
  <div class="tsd-navigation settings">
@@ -220,7 +220,7 @@ This method handles conversation management and tracking, delegating to the prov
220
220
  <li><a href="#getTracker" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Tracker</span></a></li>
221
221
  <li><a href="#invoke" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>invoke</span></a></li></ul></div></details></div>
222
222
  <div class="site-menu">
223
- <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.12.0</span></a>
223
+ <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.12.1</span></a>
224
224
  <ul class="tsd-small-nested-navigation">
225
225
  <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>
226
226
  <li><a href="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>LDFeedbackKind | @launchdarkly/server-sdk-ai - v0.12.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">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>LDFeedbackKind | @launchdarkly/server-sdk-ai - v0.12.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.12.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@launchdarkly/server-sdk-ai - v0.12.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">
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  <div class="tsd-comment tsd-typography"></div></section><aside class="tsd-sources">
22
22
  <ul>
23
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/metrics/LDFeedbackKind.ts#L4">api/metrics/LDFeedbackKind.ts:4</a></li></ul></aside>
23
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/metrics/LDFeedbackKind.ts#L4">api/metrics/LDFeedbackKind.ts:4</a></li></ul></aside>
24
24
  <section class="tsd-panel-group tsd-index-group">
25
25
  <section class="tsd-panel tsd-index-panel">
26
26
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -40,7 +40,7 @@
40
40
  </div>
41
41
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
42
42
  <ul>
43
- <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/ea50d19/packages/sdk/server-ai/src/api/metrics/LDFeedbackKind.ts#L12">api/metrics/LDFeedbackKind.ts:12</a></li></ul></aside></section>
43
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/metrics/LDFeedbackKind.ts#L12">api/metrics/LDFeedbackKind.ts:12</a></li></ul></aside></section>
44
44
  <section class="tsd-panel tsd-member"><a id="Positive" class="tsd-anchor"></a>
45
45
  <h3 class="tsd-anchor-link"><span>Positive</span><a href="#Positive" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
46
46
  <div class="tsd-signature"><span class="tsd-kind-enum-member">Positive</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;positive&quot;</span></div>
@@ -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/ea50d19/packages/sdk/server-ai/src/api/metrics/LDFeedbackKind.ts#L8">api/metrics/LDFeedbackKind.ts:8</a></li></ul></aside></section></section></div>
51
+ <li>Defined in <a href="https://github.com/launchdarkly/js-core/blob/f8a7b00/packages/sdk/server-ai/src/api/metrics/LDFeedbackKind.ts#L8">api/metrics/LDFeedbackKind.ts:8</a></li></ul></aside></section></section></div>
52
52
  <div class="col-sidebar">
53
53
  <div class="page-menu">
54
54
  <div class="tsd-navigation settings">
@@ -71,7 +71,7 @@
71
71
  <li><a href="#Negative" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>Negative</span></a></li>
72
72
  <li><a href="#Positive" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>Positive</span></a></li></ul></div></details></div>
73
73
  <div class="site-menu">
74
- <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.12.0</span></a>
74
+ <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.12.1</span></a>
75
75
  <ul class="tsd-small-nested-navigation">
76
76
  <li><a href="LDFeedbackKind.html" class="current"><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>
77
77
  <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>