Skip to content

Commit

Permalink
Release 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Sep 23, 2024
1 parent f88ef02 commit 6e1ca62
Show file tree
Hide file tree
Showing 50 changed files with 332 additions and 960 deletions.
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.0-beta16",
"version": "0.8.0",
"private": false,
"repository": "https://github.com/humanloop/humanloop-node-beta",
"main": "./index.js",
Expand Down
253 changes: 50 additions & 203 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ await client.prompts.callStream({
startTime: "2024-01-15T09:30:00Z",
endTime: "2024-01-15T09:30:00Z",
sourceDatapointId: "string",
traceId: "string",
traceParentLogId: "string",
traceParentId: "string",
batches: ["string"],
user: "string",
promptsCallStreamRequestEnvironment: "string",
Expand Down Expand Up @@ -2617,7 +2616,7 @@ await client.datasets.delete("id");
<dl>
<dd>

Update the Dataset with the given ID.
Move the Dataset to a different path or change the name.

</dd>
</dl>
Expand Down Expand Up @@ -4231,7 +4230,7 @@ await client.flows.move("id");
<dl>
<dd>

Get a list of all Flows.
Get a list of Flows.

</dd>
</dl>
Expand Down Expand Up @@ -4286,6 +4285,27 @@ await client.flows.list();
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Create or update a Flow.

Flows can also be identified by the `ID` or their `path`.

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,
an exception will be raised.

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

#### 🔌 Usage

<dl>
Expand Down Expand Up @@ -4346,7 +4366,10 @@ await client.flows.upsert({
<dl>
<dd>

Log a Flow Trace.
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.

</dd>
</dl>
Expand Down Expand Up @@ -4397,10 +4420,28 @@ await client.flows.log();
</dl>
</details>

<details><summary><code>client.flows.<a href="/src/api/resources/flows/client/Client.ts">updateTrace</a>(traceId, { ...params }) -> Humanloop.FlowLogResponse</code></summary>
<details><summary><code>client.flows.<a href="/src/api/resources/flows/client/Client.ts">updateLog</a>(logId, { ...params }) -> Humanloop.FlowLogResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Update the status, inputs, output of a Flow Log.

Marking a Flow Log as complete will trigger any monitoring Evaluators to run.
Inputs and output (or error) must be provided in order to mark it as complete.

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

#### 🔌 Usage

<dl>
Expand All @@ -4410,8 +4451,8 @@ await client.flows.log();
<dd>

```typescript
await client.flows.updateTrace("trace_id", {
status: Humanloop.TraceStatus.Complete,
await client.flows.updateLog("log_id", {
traceStatus: Humanloop.TraceStatus.Complete,
});
```

Expand All @@ -4428,7 +4469,7 @@ await client.flows.updateTrace("trace_id", {
<dl>
<dd>

**traceId:** `string` — Unique identifier for Trace.
**logId:** `string` — Unique identifier of the Flow Log.

</dd>
</dl>
Expand Down Expand Up @@ -5760,197 +5801,3 @@ await client.logs.get("prv_Wu6zx1lAWJRqOyL8nWuZk");
</dd>
</dl>
</details>

## Sessions

<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">get</a>(id) -> Humanloop.SessionResponse</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Retrieve the Session with the given ID.

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

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.sessions.get("sesh_123abc");
```

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

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**id:** `string` — Unique identifier for Session.

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Sessions.RequestOptions`

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

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

<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">delete</a>(id) -> void</code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Delete the Session with the given ID.

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

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.sessions.delete("sesh_123abc");
```

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

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**id:** `string` — Unique identifier for Session.

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Sessions.RequestOptions`

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

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

<details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">list</a>({ ...params }) -> core.Page<Humanloop.SessionResponse></code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Get a list of Sessions.

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

#### 🔌 Usage

<dl>
<dd>

<dl>
<dd>

```typescript
await client.sessions.list({
size: 1,
fileId: "pr_123abc",
});
```

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

#### ⚙️ Parameters

<dl>
<dd>

<dl>
<dd>

**request:** `Humanloop.ListSessionsGetRequest`

</dd>
</dl>

<dl>
<dd>

**requestOptions:** `Sessions.RequestOptions`

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

</dd>
</dl>
</details>
7 changes: 0 additions & 7 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { Flows } from "./api/resources/flows/client/Client";
import { Files } from "./api/resources/files/client/Client";
import { Evaluations } from "./api/resources/evaluations/client/Client";
import { Logs } from "./api/resources/logs/client/Client";
import { Sessions } from "./api/resources/sessions/client/Client";

export declare namespace HumanloopClient {
interface Options {
Expand Down Expand Up @@ -81,10 +80,4 @@ export class HumanloopClient {
public get logs(): Logs {
return (this._logs ??= new Logs(this._options));
}

protected _sessions: Sessions | undefined;

public get sessions(): Sessions {
return (this._sessions ??= new Sessions(this._options));
}
}
Loading

0 comments on commit 6e1ca62

Please sign in to comment.