phonic 0.32.15 → 0.32.16

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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "phonic",
46
- "X-Fern-SDK-Version": "0.32.15",
47
- "User-Agent": "phonic/0.32.15",
46
+ "X-Fern-SDK-Version": "0.32.16",
47
+ "User-Agent": "phonic/0.32.16",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -14,8 +14,9 @@ export declare class ConversationItemsClient {
14
14
  * Returns the alternative response(s) the assistant would have
15
15
  * produced for this conversation turn given changes to the agent system prompt.
16
16
  *
17
- * Only assistant items from ended conversations can be replayed. The
18
- * conversation must have an associated agent.
17
+ * Only assistant items from ended conversations can be replayed. Omit the
18
+ * request body (or omit `system_prompt`) to replay the turn exactly as it
19
+ * originally ran.
19
20
  *
20
21
  * @param {string} id - The ID of the conversation item to replay.
21
22
  * @param {Phonic.ReplayConversationItemRequest} request
@@ -30,10 +31,8 @@ export declare class ConversationItemsClient {
30
31
  * @throws {@link Phonic.InternalServerError}
31
32
  *
32
33
  * @example
33
- * await client.conversationItems.replay("id", {
34
- * system_prompt: "system_prompt"
35
- * })
34
+ * await client.conversationItems.replay("id")
36
35
  */
37
- replay(id: string, request: Phonic.ReplayConversationItemRequest, requestOptions?: ConversationItemsClient.RequestOptions): core.HttpResponsePromise<Phonic.ReplayConversationItemResponse>;
36
+ replay(id: string, request?: Phonic.ReplayConversationItemRequest, requestOptions?: ConversationItemsClient.RequestOptions): core.HttpResponsePromise<Phonic.ReplayConversationItemResponse>;
38
37
  private __replay;
39
38
  }
@@ -59,8 +59,9 @@ class ConversationItemsClient {
59
59
  * Returns the alternative response(s) the assistant would have
60
60
  * produced for this conversation turn given changes to the agent system prompt.
61
61
  *
62
- * Only assistant items from ended conversations can be replayed. The
63
- * conversation must have an associated agent.
62
+ * Only assistant items from ended conversations can be replayed. Omit the
63
+ * request body (or omit `system_prompt`) to replay the turn exactly as it
64
+ * originally ran.
64
65
  *
65
66
  * @param {string} id - The ID of the conversation item to replay.
66
67
  * @param {Phonic.ReplayConversationItemRequest} request
@@ -75,15 +76,13 @@ class ConversationItemsClient {
75
76
  * @throws {@link Phonic.InternalServerError}
76
77
  *
77
78
  * @example
78
- * await client.conversationItems.replay("id", {
79
- * system_prompt: "system_prompt"
80
- * })
79
+ * await client.conversationItems.replay("id")
81
80
  */
82
- replay(id, request, requestOptions) {
81
+ replay(id, request = {}, requestOptions) {
83
82
  return core.HttpResponsePromise.fromPromise(this.__replay(id, request, requestOptions));
84
83
  }
85
- __replay(id, request, requestOptions) {
86
- return __awaiter(this, void 0, void 0, function* () {
84
+ __replay(id_1) {
85
+ return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
87
86
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
88
87
  const _authRequest = yield this._options.authProvider.getAuthRequest();
89
88
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
@@ -1,12 +1,10 @@
1
1
  /**
2
2
  * @example
3
- * {
4
- * system_prompt: "system_prompt"
5
- * }
3
+ * {}
6
4
  */
7
5
  export interface ReplayConversationItemRequest {
8
- /** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. */
9
- system_prompt: string;
6
+ /** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. Omit it to replay the turn with the system prompt it originally ran with. */
7
+ system_prompt?: string;
10
8
  /** Number of alternative responses to generate. */
11
9
  num_responses?: number;
12
10
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.15";
1
+ export declare const SDK_VERSION = "0.32.16";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.32.15";
4
+ exports.SDK_VERSION = "0.32.16";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "phonic",
9
- "X-Fern-SDK-Version": "0.32.15",
10
- "User-Agent": "phonic/0.32.15",
9
+ "X-Fern-SDK-Version": "0.32.16",
10
+ "User-Agent": "phonic/0.32.16",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -14,8 +14,9 @@ export declare class ConversationItemsClient {
14
14
  * Returns the alternative response(s) the assistant would have
15
15
  * produced for this conversation turn given changes to the agent system prompt.
16
16
  *
17
- * Only assistant items from ended conversations can be replayed. The
18
- * conversation must have an associated agent.
17
+ * Only assistant items from ended conversations can be replayed. Omit the
18
+ * request body (or omit `system_prompt`) to replay the turn exactly as it
19
+ * originally ran.
19
20
  *
20
21
  * @param {string} id - The ID of the conversation item to replay.
21
22
  * @param {Phonic.ReplayConversationItemRequest} request
@@ -30,10 +31,8 @@ export declare class ConversationItemsClient {
30
31
  * @throws {@link Phonic.InternalServerError}
31
32
  *
32
33
  * @example
33
- * await client.conversationItems.replay("id", {
34
- * system_prompt: "system_prompt"
35
- * })
34
+ * await client.conversationItems.replay("id")
36
35
  */
37
- replay(id: string, request: Phonic.ReplayConversationItemRequest, requestOptions?: ConversationItemsClient.RequestOptions): core.HttpResponsePromise<Phonic.ReplayConversationItemResponse>;
36
+ replay(id: string, request?: Phonic.ReplayConversationItemRequest, requestOptions?: ConversationItemsClient.RequestOptions): core.HttpResponsePromise<Phonic.ReplayConversationItemResponse>;
38
37
  private __replay;
39
38
  }
@@ -23,8 +23,9 @@ export class ConversationItemsClient {
23
23
  * Returns the alternative response(s) the assistant would have
24
24
  * produced for this conversation turn given changes to the agent system prompt.
25
25
  *
26
- * Only assistant items from ended conversations can be replayed. The
27
- * conversation must have an associated agent.
26
+ * Only assistant items from ended conversations can be replayed. Omit the
27
+ * request body (or omit `system_prompt`) to replay the turn exactly as it
28
+ * originally ran.
28
29
  *
29
30
  * @param {string} id - The ID of the conversation item to replay.
30
31
  * @param {Phonic.ReplayConversationItemRequest} request
@@ -39,15 +40,13 @@ export class ConversationItemsClient {
39
40
  * @throws {@link Phonic.InternalServerError}
40
41
  *
41
42
  * @example
42
- * await client.conversationItems.replay("id", {
43
- * system_prompt: "system_prompt"
44
- * })
43
+ * await client.conversationItems.replay("id")
45
44
  */
46
- replay(id, request, requestOptions) {
45
+ replay(id, request = {}, requestOptions) {
47
46
  return core.HttpResponsePromise.fromPromise(this.__replay(id, request, requestOptions));
48
47
  }
49
- __replay(id, request, requestOptions) {
50
- return __awaiter(this, void 0, void 0, function* () {
48
+ __replay(id_1) {
49
+ return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
51
50
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
52
51
  const _authRequest = yield this._options.authProvider.getAuthRequest();
53
52
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
@@ -1,12 +1,10 @@
1
1
  /**
2
2
  * @example
3
- * {
4
- * system_prompt: "system_prompt"
5
- * }
3
+ * {}
6
4
  */
7
5
  export interface ReplayConversationItemRequest {
8
- /** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. */
9
- system_prompt: string;
6
+ /** The system prompt to use when generating replay responses. Use this to test prompt changes against this conversation turn. Omit it to replay the turn with the system prompt it originally ran with. */
7
+ system_prompt?: string;
10
8
  /** Number of alternative responses to generate. */
11
9
  num_responses?: number;
12
10
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.32.15";
1
+ export declare const SDK_VERSION = "0.32.16";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.32.15";
1
+ export const SDK_VERSION = "0.32.16";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phonic",
3
- "version": "0.32.15",
3
+ "version": "0.32.16",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -2406,8 +2406,9 @@ await client.apiKeys.rotate("id");
2406
2406
  Returns the alternative response(s) the assistant would have
2407
2407
  produced for this conversation turn given changes to the agent system prompt.
2408
2408
 
2409
- Only assistant items from ended conversations can be replayed. The
2410
- conversation must have an associated agent.
2409
+ Only assistant items from ended conversations can be replayed. Omit the
2410
+ request body (or omit `system_prompt`) to replay the turn exactly as it
2411
+ originally ran.
2411
2412
  </dd>
2412
2413
  </dl>
2413
2414
  </dd>
@@ -2422,9 +2423,7 @@ conversation must have an associated agent.
2422
2423
  <dd>
2423
2424
 
2424
2425
  ```typescript
2425
- await client.conversationItems.replay("id", {
2426
- system_prompt: "system_prompt"
2427
- });
2426
+ await client.conversationItems.replay("id");
2428
2427
 
2429
2428
  ```
2430
2429
  </dd>