Skip to content

Commit ba6d2f7

Browse files
author
Andrei Bratu
committed
rebase issues
1 parent d522567 commit ba6d2f7

File tree

31 files changed

+2368
-474
lines changed

31 files changed

+2368
-474
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ jobs:
3333
- name: Compile
3434
run: yarn && yarn test
3535
env:
36-
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
37-
ANTHROPIC_KEY: ${{ secrets.ANTHROPIC_KEY }}
38-
COHERE_KEY: ${{ secrets.COHERE_KEY }}
36+
HUMANLOOP_API_KEY: ${{ secrets.HUMANLOOP_API_KEY }}
37+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
3938

4039
publish:
4140
needs: [compile, test]

jest.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ export default {
33
preset: "ts-jest",
44
testEnvironment: "node",
55
moduleNameMapper: {
6-
"(.+)\.js$": "$1",
6+
"^(?!.*node_modules)(.+)\\.js$": "$1",
77
},
88
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "humanloop",
3-
"version": "0.8.21",
3+
"version": "0.8.21-beta1",
44
"private": false,
55
"repository": "https://github.com/humanloop/humanloop-node",
66
"main": "./index.js",

src/api/resources/agents/client/Client.ts

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ export class Agents {
7676
headers: {
7777
"X-Fern-Language": "JavaScript",
7878
"X-Fern-SDK-Name": "humanloop",
79-
"X-Fern-SDK-Version": "0.8.21",
80-
"User-Agent": "humanloop/0.8.21",
79+
"X-Fern-SDK-Version": "0.8.21-beta1",
80+
"User-Agent": "humanloop/0.8.21-beta1",
8181
"X-Fern-Runtime": core.RUNTIME.type,
8282
"X-Fern-Runtime-Version": core.RUNTIME.version,
8383
...(await this._getCustomAuthorizationHeaders()),
@@ -168,8 +168,8 @@ export class Agents {
168168
headers: {
169169
"X-Fern-Language": "JavaScript",
170170
"X-Fern-SDK-Name": "humanloop",
171-
"X-Fern-SDK-Version": "0.8.21",
172-
"User-Agent": "humanloop/0.8.21",
171+
"X-Fern-SDK-Version": "0.8.21-beta1",
172+
"User-Agent": "humanloop/0.8.21-beta1",
173173
"X-Fern-Runtime": core.RUNTIME.type,
174174
"X-Fern-Runtime-Version": core.RUNTIME.version,
175175
...(await this._getCustomAuthorizationHeaders()),
@@ -268,8 +268,8 @@ export class Agents {
268268
headers: {
269269
"X-Fern-Language": "JavaScript",
270270
"X-Fern-SDK-Name": "humanloop",
271-
"X-Fern-SDK-Version": "0.8.21",
272-
"User-Agent": "humanloop/0.8.21",
271+
"X-Fern-SDK-Version": "0.8.21-beta1",
272+
"User-Agent": "humanloop/0.8.21-beta1",
273273
"X-Fern-Runtime": core.RUNTIME.type,
274274
"X-Fern-Runtime-Version": core.RUNTIME.version,
275275
...(await this._getCustomAuthorizationHeaders()),
@@ -389,8 +389,8 @@ export class Agents {
389389
headers: {
390390
"X-Fern-Language": "JavaScript",
391391
"X-Fern-SDK-Name": "humanloop",
392-
"X-Fern-SDK-Version": "0.8.21",
393-
"User-Agent": "humanloop/0.8.21",
392+
"X-Fern-SDK-Version": "0.8.21-beta1",
393+
"User-Agent": "humanloop/0.8.21-beta1",
394394
"X-Fern-Runtime": core.RUNTIME.type,
395395
"X-Fern-Runtime-Version": core.RUNTIME.version,
396396
...(await this._getCustomAuthorizationHeaders()),
@@ -463,10 +463,10 @@ export class Agents {
463463
* The messages in the request will be appended
464464
* to the original messages in the log.
465465
*/
466-
public async continueCallStream(
467-
request: Humanloop.AgentsContinueCallStreamRequest,
466+
public async continueStream(
467+
request: Humanloop.AgentsContinueStreamRequest,
468468
requestOptions?: Agents.RequestOptions,
469-
): Promise<core.Stream<Humanloop.AgentContinueCallStreamResponse>> {
469+
): Promise<core.Stream<Humanloop.AgentContinueStreamResponse>> {
470470
const _response = await (this._options.fetcher ?? core.fetcher)<stream.Readable>({
471471
url: urlJoin(
472472
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -478,8 +478,8 @@ export class Agents {
478478
headers: {
479479
"X-Fern-Language": "JavaScript",
480480
"X-Fern-SDK-Name": "humanloop",
481-
"X-Fern-SDK-Version": "0.8.21",
482-
"User-Agent": "humanloop/0.8.21",
481+
"X-Fern-SDK-Version": "0.8.21-beta1",
482+
"User-Agent": "humanloop/0.8.21-beta1",
483483
"X-Fern-Runtime": core.RUNTIME.type,
484484
"X-Fern-Runtime-Version": core.RUNTIME.version,
485485
...(await this._getCustomAuthorizationHeaders()),
@@ -488,9 +488,7 @@ export class Agents {
488488
contentType: "application/json",
489489
requestType: "json",
490490
body: {
491-
...serializers.AgentsContinueCallStreamRequest.jsonOrThrow(request, {
492-
unrecognizedObjectKeys: "strip",
493-
}),
491+
...serializers.AgentsContinueCallStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
494492
stream: true,
495493
},
496494
responseType: "sse",
@@ -502,7 +500,7 @@ export class Agents {
502500
return new core.Stream({
503501
stream: _response.body,
504502
parse: async (data) => {
505-
return serializers.AgentContinueCallStreamResponse.parseOrThrow(data, {
503+
return serializers.AgentContinueStreamResponse.parseOrThrow(data, {
506504
unrecognizedObjectKeys: "passthrough",
507505
allowUnrecognizedUnionMembers: true,
508506
allowUnrecognizedEnumValues: true,
@@ -564,23 +562,23 @@ export class Agents {
564562
* The messages in the request will be appended
565563
* to the original messages in the log.
566564
*
567-
* @param {Humanloop.AgentsContinueCallRequest} request
565+
* @param {Humanloop.AgentsContinueRequest} request
568566
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
569567
*
570568
* @throws {@link Humanloop.UnprocessableEntityError}
571569
*
572570
* @example
573-
* await client.agents.continueCall({
571+
* await client.agents.continue({
574572
* logId: "log_id",
575573
* messages: [{
576574
* role: "user"
577575
* }]
578576
* })
579577
*/
580-
public async continueCall(
581-
request: Humanloop.AgentsContinueCallRequest,
578+
public async continue(
579+
request: Humanloop.AgentsContinueRequest,
582580
requestOptions?: Agents.RequestOptions,
583-
): Promise<Humanloop.AgentContinueCallResponse> {
581+
): Promise<Humanloop.AgentContinueResponse> {
584582
const _response = await (this._options.fetcher ?? core.fetcher)({
585583
url: urlJoin(
586584
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -592,8 +590,8 @@ export class Agents {
592590
headers: {
593591
"X-Fern-Language": "JavaScript",
594592
"X-Fern-SDK-Name": "humanloop",
595-
"X-Fern-SDK-Version": "0.8.21",
596-
"User-Agent": "humanloop/0.8.21",
593+
"X-Fern-SDK-Version": "0.8.21-beta1",
594+
"User-Agent": "humanloop/0.8.21-beta1",
597595
"X-Fern-Runtime": core.RUNTIME.type,
598596
"X-Fern-Runtime-Version": core.RUNTIME.version,
599597
...(await this._getCustomAuthorizationHeaders()),
@@ -610,7 +608,7 @@ export class Agents {
610608
abortSignal: requestOptions?.abortSignal,
611609
});
612610
if (_response.ok) {
613-
return serializers.AgentContinueCallResponse.parseOrThrow(_response.body, {
611+
return serializers.AgentContinueResponse.parseOrThrow(_response.body, {
614612
unrecognizedObjectKeys: "passthrough",
615613
allowUnrecognizedUnionMembers: true,
616614
allowUnrecognizedEnumValues: true,
@@ -708,8 +706,8 @@ export class Agents {
708706
headers: {
709707
"X-Fern-Language": "JavaScript",
710708
"X-Fern-SDK-Name": "humanloop",
711-
"X-Fern-SDK-Version": "0.8.21",
712-
"User-Agent": "humanloop/0.8.21",
709+
"X-Fern-SDK-Version": "0.8.21-beta1",
710+
"User-Agent": "humanloop/0.8.21-beta1",
713711
"X-Fern-Runtime": core.RUNTIME.type,
714712
"X-Fern-Runtime-Version": core.RUNTIME.version,
715713
...(await this._getCustomAuthorizationHeaders()),
@@ -802,8 +800,8 @@ export class Agents {
802800
headers: {
803801
"X-Fern-Language": "JavaScript",
804802
"X-Fern-SDK-Name": "humanloop",
805-
"X-Fern-SDK-Version": "0.8.21",
806-
"User-Agent": "humanloop/0.8.21",
803+
"X-Fern-SDK-Version": "0.8.21-beta1",
804+
"User-Agent": "humanloop/0.8.21-beta1",
807805
"X-Fern-Runtime": core.RUNTIME.type,
808806
"X-Fern-Runtime-Version": core.RUNTIME.version,
809807
...(await this._getCustomAuthorizationHeaders()),
@@ -889,8 +887,8 @@ export class Agents {
889887
headers: {
890888
"X-Fern-Language": "JavaScript",
891889
"X-Fern-SDK-Name": "humanloop",
892-
"X-Fern-SDK-Version": "0.8.21",
893-
"User-Agent": "humanloop/0.8.21",
890+
"X-Fern-SDK-Version": "0.8.21-beta1",
891+
"User-Agent": "humanloop/0.8.21-beta1",
894892
"X-Fern-Runtime": core.RUNTIME.type,
895893
"X-Fern-Runtime-Version": core.RUNTIME.version,
896894
...(await this._getCustomAuthorizationHeaders()),
@@ -973,8 +971,8 @@ export class Agents {
973971
headers: {
974972
"X-Fern-Language": "JavaScript",
975973
"X-Fern-SDK-Name": "humanloop",
976-
"X-Fern-SDK-Version": "0.8.21",
977-
"User-Agent": "humanloop/0.8.21",
974+
"X-Fern-SDK-Version": "0.8.21-beta1",
975+
"User-Agent": "humanloop/0.8.21-beta1",
978976
"X-Fern-Runtime": core.RUNTIME.type,
979977
"X-Fern-Runtime-Version": core.RUNTIME.version,
980978
...(await this._getCustomAuthorizationHeaders()),
@@ -1075,8 +1073,8 @@ export class Agents {
10751073
headers: {
10761074
"X-Fern-Language": "JavaScript",
10771075
"X-Fern-SDK-Name": "humanloop",
1078-
"X-Fern-SDK-Version": "0.8.21",
1079-
"User-Agent": "humanloop/0.8.21",
1076+
"X-Fern-SDK-Version": "0.8.21-beta1",
1077+
"User-Agent": "humanloop/0.8.21-beta1",
10801078
"X-Fern-Runtime": core.RUNTIME.type,
10811079
"X-Fern-Runtime-Version": core.RUNTIME.version,
10821080
...(await this._getCustomAuthorizationHeaders()),
@@ -1157,8 +1155,8 @@ export class Agents {
11571155
headers: {
11581156
"X-Fern-Language": "JavaScript",
11591157
"X-Fern-SDK-Name": "humanloop",
1160-
"X-Fern-SDK-Version": "0.8.21",
1161-
"User-Agent": "humanloop/0.8.21",
1158+
"X-Fern-SDK-Version": "0.8.21-beta1",
1159+
"User-Agent": "humanloop/0.8.21-beta1",
11621160
"X-Fern-Runtime": core.RUNTIME.type,
11631161
"X-Fern-Runtime-Version": core.RUNTIME.version,
11641162
...(await this._getCustomAuthorizationHeaders()),
@@ -1237,8 +1235,8 @@ export class Agents {
12371235
headers: {
12381236
"X-Fern-Language": "JavaScript",
12391237
"X-Fern-SDK-Name": "humanloop",
1240-
"X-Fern-SDK-Version": "0.8.21",
1241-
"User-Agent": "humanloop/0.8.21",
1238+
"X-Fern-SDK-Version": "0.8.21-beta1",
1239+
"User-Agent": "humanloop/0.8.21-beta1",
12421240
"X-Fern-Runtime": core.RUNTIME.type,
12431241
"X-Fern-Runtime-Version": core.RUNTIME.version,
12441242
...(await this._getCustomAuthorizationHeaders()),
@@ -1330,8 +1328,8 @@ export class Agents {
13301328
headers: {
13311329
"X-Fern-Language": "JavaScript",
13321330
"X-Fern-SDK-Name": "humanloop",
1333-
"X-Fern-SDK-Version": "0.8.21",
1334-
"User-Agent": "humanloop/0.8.21",
1331+
"X-Fern-SDK-Version": "0.8.21-beta1",
1332+
"User-Agent": "humanloop/0.8.21-beta1",
13351333
"X-Fern-Runtime": core.RUNTIME.type,
13361334
"X-Fern-Runtime-Version": core.RUNTIME.version,
13371335
...(await this._getCustomAuthorizationHeaders()),
@@ -1427,8 +1425,8 @@ export class Agents {
14271425
headers: {
14281426
"X-Fern-Language": "JavaScript",
14291427
"X-Fern-SDK-Name": "humanloop",
1430-
"X-Fern-SDK-Version": "0.8.21",
1431-
"User-Agent": "humanloop/0.8.21",
1428+
"X-Fern-SDK-Version": "0.8.21-beta1",
1429+
"User-Agent": "humanloop/0.8.21-beta1",
14321430
"X-Fern-Runtime": core.RUNTIME.type,
14331431
"X-Fern-Runtime-Version": core.RUNTIME.version,
14341432
...(await this._getCustomAuthorizationHeaders()),
@@ -1519,8 +1517,8 @@ export class Agents {
15191517
headers: {
15201518
"X-Fern-Language": "JavaScript",
15211519
"X-Fern-SDK-Name": "humanloop",
1522-
"X-Fern-SDK-Version": "0.8.21",
1523-
"User-Agent": "humanloop/0.8.21",
1520+
"X-Fern-SDK-Version": "0.8.21-beta1",
1521+
"User-Agent": "humanloop/0.8.21-beta1",
15241522
"X-Fern-Runtime": core.RUNTIME.type,
15251523
"X-Fern-Runtime-Version": core.RUNTIME.version,
15261524
...(await this._getCustomAuthorizationHeaders()),
@@ -1599,8 +1597,8 @@ export class Agents {
15991597
headers: {
16001598
"X-Fern-Language": "JavaScript",
16011599
"X-Fern-SDK-Name": "humanloop",
1602-
"X-Fern-SDK-Version": "0.8.21",
1603-
"User-Agent": "humanloop/0.8.21",
1600+
"X-Fern-SDK-Version": "0.8.21-beta1",
1601+
"User-Agent": "humanloop/0.8.21-beta1",
16041602
"X-Fern-Runtime": core.RUNTIME.type,
16051603
"X-Fern-Runtime-Version": core.RUNTIME.version,
16061604
...(await this._getCustomAuthorizationHeaders()),
@@ -1688,8 +1686,8 @@ export class Agents {
16881686
headers: {
16891687
"X-Fern-Language": "JavaScript",
16901688
"X-Fern-SDK-Name": "humanloop",
1691-
"X-Fern-SDK-Version": "0.8.21",
1692-
"User-Agent": "humanloop/0.8.21",
1689+
"X-Fern-SDK-Version": "0.8.21-beta1",
1690+
"User-Agent": "humanloop/0.8.21-beta1",
16931691
"X-Fern-Runtime": core.RUNTIME.type,
16941692
"X-Fern-Runtime-Version": core.RUNTIME.version,
16951693
...(await this._getCustomAuthorizationHeaders()),
@@ -1771,7 +1769,7 @@ export class Agents {
17711769
id: string,
17721770
request: Humanloop.SerializeAgentsIdSerializeGetRequest = {},
17731771
requestOptions?: Agents.RequestOptions,
1774-
): Promise<void> {
1772+
): Promise<unknown> {
17751773
const { versionId, environment } = request;
17761774
const _queryParams: Record<string, string | string[] | object | object[] | null> = {};
17771775
if (versionId != null) {
@@ -1793,8 +1791,8 @@ export class Agents {
17931791
headers: {
17941792
"X-Fern-Language": "JavaScript",
17951793
"X-Fern-SDK-Name": "humanloop",
1796-
"X-Fern-SDK-Version": "0.8.21",
1797-
"User-Agent": "humanloop/0.8.21",
1794+
"X-Fern-SDK-Version": "0.8.21-beta1",
1795+
"User-Agent": "humanloop/0.8.21-beta1",
17981796
"X-Fern-Runtime": core.RUNTIME.type,
17991797
"X-Fern-Runtime-Version": core.RUNTIME.version,
18001798
...(await this._getCustomAuthorizationHeaders()),
@@ -1808,7 +1806,7 @@ export class Agents {
18081806
abortSignal: requestOptions?.abortSignal,
18091807
});
18101808
if (_response.ok) {
1811-
return;
1809+
return _response.body;
18121810
}
18131811

18141812
if (_response.error.reason === "status-code") {
@@ -1877,8 +1875,8 @@ export class Agents {
18771875
headers: {
18781876
"X-Fern-Language": "JavaScript",
18791877
"X-Fern-SDK-Name": "humanloop",
1880-
"X-Fern-SDK-Version": "0.8.21",
1881-
"User-Agent": "humanloop/0.8.21",
1878+
"X-Fern-SDK-Version": "0.8.21-beta1",
1879+
"User-Agent": "humanloop/0.8.21-beta1",
18821880
"X-Fern-Runtime": core.RUNTIME.type,
18831881
"X-Fern-Runtime-Version": core.RUNTIME.version,
18841882
...(await this._getCustomAuthorizationHeaders()),
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Humanloop from "../../../../index";
6+
7+
/**
8+
* @example
9+
* {
10+
* logId: "log_id",
11+
* messages: [{
12+
* role: "user"
13+
* }]
14+
* }
15+
*/
16+
export interface AgentsContinueCallRequest {
17+
/** This identifies the Agent Log to continue. */
18+
logId: string;
19+
/** The additional messages with which to continue the Agent Log. Often, these should start with the Tool messages with results for the previous Assistant message's tool calls. */
20+
messages: Humanloop.ChatMessage[];
21+
/** API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. */
22+
providerApiKeys?: Humanloop.ProviderApiKeys;
23+
/** If true, populate `trace_children` for the returned Agent Log. Defaults to false. */
24+
includeTraceChildren?: boolean;
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* This file was auto-generated by Fern from our API Definition.
3+
*/
4+
5+
import * as Humanloop from "../../../../index";
6+
7+
/**
8+
* @example
9+
* {
10+
* logId: "log_id",
11+
* messages: [{
12+
* role: "user"
13+
* }]
14+
* }
15+
*/
16+
export interface AgentsContinueStreamRequest {
17+
/** This identifies the Agent Log to continue. */
18+
logId: string;
19+
/** The additional messages with which to continue the Agent Log. Often, these should start with the Tool messages with results for the previous Assistant message's tool calls. */
20+
messages: Humanloop.ChatMessage[];
21+
/** API keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. */
22+
providerApiKeys?: Humanloop.ProviderApiKeys;
23+
/** If true, populate `trace_children` for the returned Agent Log. Defaults to false. */
24+
includeTraceChildren?: boolean;
25+
}

0 commit comments

Comments
 (0)