Skip to content
Closed
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
1 change: 1 addition & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

src/otel
src/eval_utils
src/prompt_utils.ts
src/utilities
src/index.ts
src/humanloop.client.ts
Expand Down
73 changes: 4 additions & 69 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2411,7 +2411,7 @@ By default, the new Dataset version will be set to the list of Datapoints provid
the request. You can also create a new version by adding or removing Datapoints from an existing version
by specifying `action` as `add` or `remove` respectively. In this case, you may specify
the `version_id` or `environment` query parameters to identify the existing version to base
the new version on. If neither is provided, the latest created version will be used.
the new version on. If neither is provided, the default deployed version will be used.

If you provide a commit message, then the new version will be committed;
otherwise it will be uncommitted. If you try to commit an already committed version,
Expand Down Expand Up @@ -5641,7 +5641,7 @@ await client.directories.update("id");

## Files

<details><summary><code>client.files.<a href="/src/api/resources/files/client/Client.ts">listFiles</a>({ ...params }) -> Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse</code></summary>
<details><summary><code>client.files.<a href="/src/api/resources/files/client/Client.ts">list</a>({ ...params }) -> Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -5669,7 +5669,7 @@ Get a paginated list of files.
<dd>

```typescript
await client.files.listFiles();
await client.files.list();
```

</dd>
Expand All @@ -5685,72 +5685,7 @@ await client.files.listFiles();
<dl>
<dd>

**request:** `Humanloop.ListFilesFilesGetRequest`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Files.RequestOptions`

</dd>
</dl>
</dd>
</dl>

</dd>
</dl>
</details>

<details><summary><code>client.files.<a href="/src/api/resources/files/client/Client.ts">retrieveByPath</a>({ ...params }) -> Humanloop.RetrieveByPathFilesRetrieveByPathPostResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Retrieve a File by path.

</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.files.retrieveByPath({
path: "path",
});
```

</dd>
</dl>
</dd>
</dl>

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Humanloop.BodyRetrieveByPathFilesRetrieveByPathPost`
**request:** `Humanloop.FilesListRequest`

</dd>
</dl>
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/datasets/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class Datasets {
* the request. You can also create a new version by adding or removing Datapoints from an existing version
* by specifying `action` as `add` or `remove` respectively. In this case, you may specify
* the `version_id` or `environment` query parameters to identify the existing version to base
* the new version on. If neither is provided, the latest created version will be used.
* the new version on. If neither is provided, the default deployed version will be used.
*
* If you provide a commit message, then the new version will be committed;
* otherwise it will be uncommitted. If you try to commit an already committed version,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ export interface CreateEvaluatorLogRequest {
save?: boolean;
/** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */
logId?: string;
/** The message returned by the LLM. Only populated for LLM Evaluator Logs. */
outputMessage?: Humanloop.ChatMessage;
/** Evaluator assessment of the Log. */
judgment?: Humanloop.CreateEvaluatorLogRequestJudgment;
/** Whether the Log has been manually marked as completed by a user. */
Expand Down
14 changes: 5 additions & 9 deletions src/api/resources/files/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@
/**
* Get a paginated list of files.
*
* @param {Humanloop.ListFilesFilesGetRequest} request
* @param {Humanloop.FilesListRequest} request
* @param {Files.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link Humanloop.UnprocessableEntityError}
*
* @example
* await client.files.listFiles()
* await client.files.list()
*/
public async listFiles(
request: Humanloop.ListFilesFilesGetRequest = {},
public async list(
request: Humanloop.FilesListRequest = {},
requestOptions?: Files.RequestOptions,
): Promise<Humanloop.PaginatedDataUnionPromptResponseToolResponseDatasetResponseEvaluatorResponseFlowResponse> {
const { page, size, name, template, type: type_, environment, sortBy, order } = request;
const { page, size, name, type: type_, environment, sortBy, order } = request;
const _queryParams: Record<string, string | string[] | object | object[]> = {};
if (page != null) {
_queryParams["page"] = page.toString();
Expand All @@ -58,10 +58,6 @@
_queryParams["name"] = name;
}

if (template != null) {
_queryParams["template"] = template.toString();
}

if (type_ != null) {
if (Array.isArray(type_)) {
_queryParams["type"] = type_.map((item) => item);
Expand Down Expand Up @@ -166,9 +162,9 @@
* })
*/
public async retrieveByPath(
request: Humanloop.BodyRetrieveByPathFilesRetrieveByPathPost,

Check failure on line 165 in src/api/resources/files/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

Namespace '"/home/runner/work/humanloop-node/humanloop-node/src/api/index"' has no exported member 'BodyRetrieveByPathFilesRetrieveByPathPost'.
requestOptions?: Files.RequestOptions,
): Promise<Humanloop.RetrieveByPathFilesRetrieveByPathPostResponse> {

Check failure on line 167 in src/api/resources/files/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

Namespace '"/home/runner/work/humanloop-node/humanloop-node/src/api/index"' has no exported member 'RetrieveByPathFilesRetrieveByPathPostResponse'.
const { environment, ..._body } = request;
const _queryParams: Record<string, string | string[] | object | object[]> = {};
if (environment != null) {
Expand All @@ -193,7 +189,7 @@
contentType: "application/json",
queryParameters: _queryParams,
requestType: "json",
body: serializers.BodyRetrieveByPathFilesRetrieveByPathPost.jsonOrThrow(_body, {

Check failure on line 192 in src/api/resources/files/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

Property 'BodyRetrieveByPathFilesRetrieveByPathPost' does not exist on type 'typeof import("/home/runner/work/humanloop-node/humanloop-node/src/serialization/index")'.
unrecognizedObjectKeys: "strip",
}),
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
Expand All @@ -201,7 +197,7 @@
abortSignal: requestOptions?.abortSignal,
});
if (_response.ok) {
return serializers.RetrieveByPathFilesRetrieveByPathPostResponse.parseOrThrow(_response.body, {

Check failure on line 200 in src/api/resources/files/client/Client.ts

View workflow job for this annotation

GitHub Actions / compile

Property 'RetrieveByPathFilesRetrieveByPathPostResponse' does not exist on type 'typeof import("/home/runner/work/humanloop-node/humanloop-node/src/serialization/index")'.
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Humanloop from "../../../../index";
* @example
* {}
*/
export interface ListFilesFilesGetRequest {
export interface FilesListRequest {
/**
* Page offset for pagination.
*/
Expand All @@ -21,10 +21,6 @@ export interface ListFilesFilesGetRequest {
* Case-insensitive filter for file name.
*/
name?: string;
/**
* Filter to include only template files.
*/
template?: boolean;
/**
* List of file types to filter for.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/api/resources/files/client/requests/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { type ListFilesFilesGetRequest } from "./ListFilesFilesGetRequest";
export { type BodyRetrieveByPathFilesRetrieveByPathPost } from "./BodyRetrieveByPathFilesRetrieveByPathPost";
export { type FilesListRequest } from "./FilesListRequest";
1 change: 0 additions & 1 deletion src/api/resources/files/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./types";
export * from "./client";

This file was deleted.

1 change: 0 additions & 1 deletion src/api/resources/files/types/index.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/api/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ export * as prompts from "./prompts";
export * from "./prompts/types";
export * as evaluators from "./evaluators";
export * from "./evaluators/types";
export * as files from "./files";
export * from "./files/types";
export * as evaluations from "./evaluations";
export * from "./evaluations/types";
export * as tools from "./tools";
export * as datasets from "./datasets";
export * as flows from "./flows";
export * as directories from "./directories";
export * as files from "./files";
export * as logs from "./logs";
export * from "./prompts/client/requests";
export * from "./tools/client/requests";
Expand Down
8 changes: 0 additions & 8 deletions src/api/resources/logs/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export class Logs {
size,
versionId,
versionStatus,
id,
search,
metadataSearch,
startDate,
Expand All @@ -91,13 +90,6 @@ export class Logs {
if (versionStatus != null) {
_queryParams["version_status"] = versionStatus;
}
if (id != null) {
if (Array.isArray(id)) {
_queryParams["id"] = id.map((item) => item);
} else {
_queryParams["id"] = id;
}
}
if (search != null) {
_queryParams["search"] = search;
}
Expand Down
4 changes: 0 additions & 4 deletions src/api/resources/logs/client/requests/ListLogsGetRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export interface ListLogsGetRequest {
* If provided, only Logs belonging to Versions with the specified status will be returned.
*/
versionStatus?: Humanloop.VersionStatus;
/**
* If provided, returns Logs whose IDs contain any of the specified values as substrings.
*/
id?: string | string[];
/**
* If provided, only Logs that contain the provided string in its inputs and output will be returned.
*/
Expand Down
6 changes: 0 additions & 6 deletions src/api/resources/prompts/client/requests/PromptRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,4 @@ export interface PromptRequest {
attributes?: Record<string, unknown>;
/** Message describing the changes made. */
commitMessage?: string;
/** Description of the Prompt. */
description?: string;
/** List of tags associated with this prompt. */
tags?: string[];
/** Long description of the Prompt. */
readme?: string;
}
3 changes: 1 addition & 2 deletions src/api/types/ChatRole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
/**
* An enumeration.
*/
export type ChatRole = "user" | "assistant" | "system" | "tool" | "developer";
export type ChatRole = "user" | "assistant" | "system" | "tool";

export const ChatRole = {
User: "user",
Assistant: "assistant",
System: "system",
Tool: "tool",
Developer: "developer",
} as const;
6 changes: 0 additions & 6 deletions src/api/types/CodeEvaluatorRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ export interface CodeEvaluatorRequest {
returnType: Humanloop.EvaluatorReturnTypeEnum;
/** Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used. */
attributes?: Record<string, unknown>;
/** The options that can be applied as judgments. Only for Evaluators with `return_type` of 'boolean', 'select' or 'multi_select'. */
options?: Humanloop.EvaluatorJudgmentOptionResponse[];
/** Limits on the judgment that can be applied. Only for Evaluators with `return_type` of 'number'. */
numberLimits?: Humanloop.EvaluatorJudgmentNumberLimit;
/** The valence of the number judgment. Only for Evaluators with `return_type` of 'number'. If 'positive', a higher number is better. If 'negative', a lower number is better. */
numberValence?: Humanloop.Valence;
evaluatorType: "python";
/** The code for the Evaluator. This code will be executed in a sandboxed environment. */
code: string;
Expand Down
6 changes: 0 additions & 6 deletions src/api/types/DatasetResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ export interface DatasetResponse {
directoryId?: string;
/** Name of the Dataset, which is used as a unique identifier. */
name: string;
/** Description of the Dataset. */
description?: string;
/** Long description of the file. */
readme?: string;
/** List of tags associated with the file. */
tags?: string[];
/** Unique identifier for the specific Dataset Version. If no query params provided, the default deployed Dataset Version is returned. Starts with `dsv_`. */
versionId: string;
type?: "dataset";
Expand Down
6 changes: 0 additions & 6 deletions src/api/types/DirectoryResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ export interface DirectoryResponse {
parentId?: string;
/** Name of the directory. */
name: string;
/** Description of the directory. */
description?: string;
/** Path to the directory, relative to the root directory. Includes name, e.g. `path/to/directory`. */
path: string;
/** Long description of the directory. */
readme?: string;
/** List of tags associated with the directory. */
tags: string[];
createdAt: Date;
updatedAt: Date;
}
6 changes: 0 additions & 6 deletions src/api/types/DirectoryWithParentsAndChildrenResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,8 @@ export interface DirectoryWithParentsAndChildrenResponse {
parentId?: string;
/** Name of the directory. */
name: string;
/** Description of the directory. */
description?: string;
/** Path to the directory, relative to the root directory. Includes name, e.g. `path/to/directory`. */
path: string;
/** Long description of the directory. */
readme?: string;
/** List of tags associated with the directory. */
tags: string[];
createdAt: Date;
updatedAt: Date;
/** List of subdirectories in the directory. */
Expand Down
2 changes: 0 additions & 2 deletions src/api/types/EvaluatorLogResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export interface EvaluatorLogResponse {
save?: boolean;
/** This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you. */
logId?: string;
/** The message returned by the LLM. Only populated for LLM Evaluator Logs. */
outputMessage?: Humanloop.ChatMessage;
/** Evaluator assessment of the Log. */
judgment?: Humanloop.EvaluatorLogResponseJudgment;
/** Whether the Log has been manually marked as completed by a user. */
Expand Down
6 changes: 0 additions & 6 deletions src/api/types/EvaluatorResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ export interface EvaluatorResponse {
spec: Humanloop.EvaluatorResponseSpec;
/** Name of the Evaluator, which is used as a unique identifier. */
name: string;
/** Description of the Evaluator. */
description?: string;
/** Long description of the file. */
readme?: string;
/** List of tags associated with the file. */
tags?: string[];
/** Unique identifier for the specific Evaluator Version. If no query params provided, the default deployed Evaluator Version is returned. */
versionId: string;
type?: "evaluator";
Expand Down
6 changes: 0 additions & 6 deletions src/api/types/ExternalEvaluatorRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,5 @@ export interface ExternalEvaluatorRequest {
returnType: Humanloop.EvaluatorReturnTypeEnum;
/** Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used. */
attributes?: Record<string, unknown>;
/** The options that can be applied as judgments. Only for Evaluators with `return_type` of 'boolean', 'select' or 'multi_select'. */
options?: Humanloop.EvaluatorJudgmentOptionResponse[];
/** Limits on the judgment that can be applied. Only for Evaluators with `return_type` of 'number'. */
numberLimits?: Humanloop.EvaluatorJudgmentNumberLimit;
/** The valence of the number judgment. Only for Evaluators with `return_type` of 'number'. If 'positive', a higher number is better. If 'negative', a lower number is better. */
numberValence?: Humanloop.Valence;
evaluatorType: "external";
}
Loading
Loading