Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export default {
preset: "ts-jest",
testEnvironment: "node",
moduleNameMapper: {
"^(?!.*node_modules)(.+)\\.js$": "$1",
"(.+)\.js$": "$1",
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "humanloop",
"version": "0.8.21-beta1",
"version": "0.8.21-beta2",
"private": false,
"repository": "https://github.com/humanloop/humanloop-node",
"main": "./index.js",
Expand Down
7 changes: 2 additions & 5 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ await client.prompts.updateMonitoring("pr_30gco7dx6JDq4200GVOHa", {
</dl>
</details>

<details><summary><code>client.prompts.<a href="/src/api/resources/prompts/client/Client.ts">serialize</a>(id, { ...params }) -> void</code></summary>
<details><summary><code>client.prompts.<a href="/src/api/resources/prompts/client/Client.ts">serialize</a>(id, { ...params }) -> string</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -4794,9 +4794,6 @@ Log to a Flow.
You can use query parameters `version_id`, or `environment`, to target
an existing version of the Flow. Otherwise, the default deployed version will be chosen.

If you create the Flow Log with a `log_status` of `incomplete`, you should later update it to `complete`
in order to trigger Evaluators.

</dd>
</dl>
</dd>
Expand Down Expand Up @@ -7313,7 +7310,7 @@ await client.agents.updateMonitoring("ag_1234567890", {
</dl>
</details>

<details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">serialize</a>(id, { ...params }) -> void</code></summary>
<details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">serialize</a>(id, { ...params }) -> string</code></summary>
<dl>
<dd>

Expand Down
486 changes: 306 additions & 180 deletions src/api/resources/agents/client/Client.ts

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions src/api/resources/agents/client/requests/AgentLogRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,13 @@ export interface AgentLogRequest {
* - `{'type': 'function', 'function': {name': <TOOL_NAME>}}` forces the model to use the named function.
*/
toolChoice?: Humanloop.AgentLogRequestToolChoice;
/** Details of your Agent. A new Agent version will be created if the provided details are new. */
agent?: Humanloop.AgentKernelRequest;
/**
* The Agent configuration to use. Two formats are supported:
* - An object representing the details of the Agent configuration
* - A string representing the raw contents of a .agent file
* A new Agent version will be created if the provided details do not match any existing version.
*/
agent?: Humanloop.AgentLogRequestAgent;
/** When the logged event started. */
startTime?: Date;
/** When the logged event ended. */
Expand All @@ -115,8 +120,6 @@ export interface AgentLogRequest {
source?: string;
/** Any additional metadata to record. */
metadata?: Record<string, unknown>;
/** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */
logStatus?: Humanloop.LogStatus;
/** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */
sourceDatapointId?: string;
/** The ID of the parent Log to nest this Log under in a Trace. */
Expand Down
11 changes: 7 additions & 4 deletions src/api/resources/agents/client/requests/AgentsCallRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ export interface AgentsCallRequest {
* - `{'type': 'function', 'function': {name': <TOOL_NAME>}}` forces the model to use the named function.
*/
toolChoice?: Humanloop.AgentsCallRequestToolChoice;
/** Details of your Agent. A new Agent version will be created if the provided details are new. */
agent?: Humanloop.AgentKernelRequest;
/**
* The Agent configuration to use. Two formats are supported:
* - An object representing the details of the Agent configuration
* - A string representing the raw contents of a .agent file
* A new Agent version will be created if the provided details do not match any existing version.
*/
agent?: Humanloop.AgentsCallRequestAgent;
/** The inputs passed to the prompt template. */
inputs?: Record<string, unknown>;
/** Identifies where the model was called from. */
Expand All @@ -49,8 +54,6 @@ export interface AgentsCallRequest {
startTime?: Date;
/** When the logged event ended. */
endTime?: Date;
/** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */
logStatus?: Humanloop.LogStatus;
/** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */
sourceDatapointId?: string;
/** The ID of the parent Log to nest this Log under in a Trace. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ export interface AgentsCallStreamRequest {
* - `{'type': 'function', 'function': {name': <TOOL_NAME>}}` forces the model to use the named function.
*/
toolChoice?: Humanloop.AgentsCallStreamRequestToolChoice;
/** Details of your Agent. A new Agent version will be created if the provided details are new. */
agent?: Humanloop.AgentKernelRequest;
/**
* The Agent configuration to use. Two formats are supported:
* - An object representing the details of the Agent configuration
* - A string representing the raw contents of a .agent file
* A new Agent version will be created if the provided details do not match any existing version.
*/
agent?: Humanloop.AgentsCallStreamRequestAgent;
/** The inputs passed to the prompt template. */
inputs?: Record<string, unknown>;
/** Identifies where the model was called from. */
Expand All @@ -43,8 +48,6 @@ export interface AgentsCallStreamRequest {
startTime?: Date;
/** When the logged event ended. */
endTime?: Date;
/** Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior. */
logStatus?: Humanloop.LogStatus;
/** Unique identifier for the Datapoint that this Log is derived from. This can be used by Humanloop to associate Logs to Evaluations. If provided, Humanloop will automatically associate this Log to Evaluations that require a Log for this Datapoint-Version pair. */
sourceDatapointId?: string;
/** The ID of the parent Log to nest this Log under in a Trace. */
Expand Down
25 changes: 0 additions & 25 deletions src/api/resources/agents/client/requests/AgentsContinueRequest.ts

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface ListAgentsGetRequest {
/**
* Field to sort Agents by
*/
sortBy?: Humanloop.ProjectSortBy;
sortBy?: Humanloop.FileSortBy;
/**
* Direction to sort by.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ export interface UpdateAgentLogRequest {
output?: string;
/** The error message of the Flow Log. Provide None to unset existing `error` value. Provide either this, `output_message` or `output`. */
error?: string;
/** Status of the Flow Log. When a Flow Log is updated to `complete`, no more Logs can be added to it. Monitoring Evaluators will only run on `complete` Flow Logs. */
/** Status of the Flow Log. When a Flow Log is updated to `complete`, no more Logs can be added to it. You cannot update a Flow Log's status from `complete` to `incomplete`. */
logStatus?: Humanloop.LogStatus;
}
13 changes: 13 additions & 0 deletions src/api/resources/agents/types/AgentLogRequestAgent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Humanloop from "../../../index";

/**
* The Agent configuration to use. Two formats are supported:
* - An object representing the details of the Agent configuration
* - A string representing the raw contents of a .agent file
* A new Agent version will be created if the provided details do not match any existing version.
*/
export type AgentLogRequestAgent = Humanloop.AgentKernelRequest | string;
13 changes: 13 additions & 0 deletions src/api/resources/agents/types/AgentsCallRequestAgent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Humanloop from "../../../index";

/**
* The Agent configuration to use. Two formats are supported:
* - An object representing the details of the Agent configuration
* - A string representing the raw contents of a .agent file
* A new Agent version will be created if the provided details do not match any existing version.
*/
export type AgentsCallRequestAgent = Humanloop.AgentKernelRequest | string;
13 changes: 13 additions & 0 deletions src/api/resources/agents/types/AgentsCallStreamRequestAgent.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* This file was auto-generated by Fern from our API Definition.
*/

import * as Humanloop from "../../../index";

/**
* The Agent configuration to use. Two formats are supported:
* - An object representing the details of the Agent configuration
* - A string representing the raw contents of a .agent file
* A new Agent version will be created if the provided details do not match any existing version.
*/
export type AgentsCallStreamRequestAgent = Humanloop.AgentKernelRequest | string;
3 changes: 3 additions & 0 deletions src/api/resources/agents/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
export * from "./AgentLogRequestToolChoice";
export * from "./AgentLogRequestAgent";
export * from "./AgentsCallStreamRequestToolChoice";
export * from "./AgentsCallStreamRequestAgent";
export * from "./AgentsCallRequestToolChoice";
export * from "./AgentsCallRequestAgent";
export * from "./AgentRequestTemplate";
export * from "./AgentRequestStop";
export * from "./AgentRequestReasoningEffort";
Expand Down
54 changes: 27 additions & 27 deletions src/api/resources/datasets/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class Datasets {
_queryParams["user_filter"] = userFilter;
}
if (sortBy != null) {
_queryParams["sort_by"] = serializers.ProjectSortBy.jsonOrThrow(sortBy, {
_queryParams["sort_by"] = serializers.FileSortBy.jsonOrThrow(sortBy, {
unrecognizedObjectKeys: "strip",
});
}
Expand All @@ -107,8 +107,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -275,8 +275,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -388,8 +388,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -470,8 +470,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -550,8 +550,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -656,8 +656,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -763,8 +763,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -850,8 +850,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -934,8 +934,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1055,8 +1055,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1155,8 +1155,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1246,8 +1246,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -1326,8 +1326,8 @@ export class Datasets {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "humanloop",
"X-Fern-SDK-Version": "0.8.21-beta1",
"User-Agent": "humanloop/0.8.21-beta1",
"X-Fern-SDK-Version": "0.8.21-beta2",
"User-Agent": "humanloop/0.8.21-beta2",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Loading