Skip to content

Commit bb128fc

Browse files
committed
Release 0.8.0b17
1 parent 7087f6e commit bb128fc

19 files changed

+290
-330
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ response = client.prompts.call_stream(
190190
"2024-01-15 09:30:00+00:00",
191191
),
192192
source_datapoint_id="string",
193-
trace_id="string",
194-
trace_parent_log_id="string",
193+
trace_parent_id="string",
195194
batches=["string"],
196195
user="string",
197196
prompts_call_stream_request_environment="string",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "humanloop"
3-
version = "0.8.0b16"
3+
version = "0.8.0b17"
44
description = ""
55
readme = "README.md"
66
authors = []

reference.md

Lines changed: 70 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -306,15 +306,7 @@ Controls how the model uses tools. The following options are supported:
306306
<dl>
307307
<dd>
308308

309-
**trace_id:** `typing.Optional[str]` — Identifier of the Flow Log to which the Log will be associated. Multiple Logs can be associated by passing the same trace_id in subsequent log requests. Use the Flow File log endpoint to create the Trace first.
310-
311-
</dd>
312-
</dl>
313-
314-
<dl>
315-
<dd>
316-
317-
**trace_parent_log_id:** `typing.Optional[str]` — Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
309+
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
318310

319311
</dd>
320312
</dl>
@@ -719,8 +711,7 @@ response = client.prompts.call_stream(
719711
"2024-01-15 09:30:00+00:00",
720712
),
721713
source_datapoint_id="string",
722-
trace_id="string",
723-
trace_parent_log_id="string",
714+
trace_parent_id="string",
724715
batches=["string"],
725716
user="string",
726717
prompts_call_stream_request_environment="string",
@@ -867,15 +858,7 @@ Controls how the model uses tools. The following options are supported:
867858
<dl>
868859
<dd>
869860

870-
**trace_id:** `typing.Optional[str]` — Identifier of the Flow Log to which the Log will be associated. Multiple Logs can be associated by passing the same trace_id in subsequent log requests. Use the Flow File log endpoint to create the Trace first.
871-
872-
</dd>
873-
</dl>
874-
875-
<dl>
876-
<dd>
877-
878-
**trace_parent_log_id:** `typing.Optional[str]` — Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
861+
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
879862

880863
</dd>
881864
</dl>
@@ -1141,15 +1124,7 @@ Controls how the model uses tools. The following options are supported:
11411124
<dl>
11421125
<dd>
11431126

1144-
**trace_id:** `typing.Optional[str]` — Identifier of the Flow Log to which the Log will be associated. Multiple Logs can be associated by passing the same trace_id in subsequent log requests. Use the Flow File log endpoint to create the Trace first.
1145-
1146-
</dd>
1147-
</dl>
1148-
1149-
<dl>
1150-
<dd>
1151-
1152-
**trace_parent_log_id:** `typing.Optional[str]` — Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
1127+
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
11531128

11541129
</dd>
11551130
</dl>
@@ -2565,15 +2540,7 @@ client.tools.log(
25652540
<dl>
25662541
<dd>
25672542

2568-
**trace_id:** `typing.Optional[str]` — Identifier of the Flow Log to which the Log will be associated. Multiple Logs can be associated by passing the same trace_id in subsequent log requests. Use the Flow File log endpoint to create the Trace first.
2569-
2570-
</dd>
2571-
</dl>
2572-
2573-
<dl>
2574-
<dd>
2575-
2576-
**trace_parent_log_id:** `typing.Optional[str]` — Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
2543+
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
25772544

25782545
</dd>
25792546
</dl>
@@ -4304,7 +4271,7 @@ client.datasets.delete(
43044271
<dl>
43054272
<dd>
43064273

4307-
Update the Dataset with the given ID.
4274+
Move the Dataset to a different path or change the name.
43084275
</dd>
43094276
</dl>
43104277
</dd>
@@ -6092,15 +6059,7 @@ client.evaluators.log(
60926059
<dl>
60936060
<dd>
60946061

6095-
**trace_id:** `typing.Optional[str]` — Identifier of the Flow Log to which the Log will be associated. Multiple Logs can be associated by passing the same trace_id in subsequent log requests. Use the Flow File log endpoint to create the Trace first.
6096-
6097-
</dd>
6098-
</dl>
6099-
6100-
<dl>
6101-
<dd>
6102-
6103-
**trace_parent_log_id:** `typing.Optional[str]` — Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
6062+
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
61046063

61056064
</dd>
61066065
</dl>
@@ -6434,7 +6393,7 @@ client.flows.move(
64346393
<dl>
64356394
<dd>
64366395

6437-
Get a list of all Flows.
6396+
Get a list of Flows.
64386397
</dd>
64396398
</dl>
64406399
</dd>
@@ -6534,6 +6493,26 @@ client.flows.list()
65346493
<dl>
65356494
<dd>
65366495

6496+
#### 📝 Description
6497+
6498+
<dl>
6499+
<dd>
6500+
6501+
<dl>
6502+
<dd>
6503+
6504+
Create or update a Flow.
6505+
6506+
Flows can also be identified by the `ID` or their `path`.
6507+
6508+
If you provide a commit message, then the new version will be committed;
6509+
otherwise it will be uncommitted. If you try to commit an already committed version,
6510+
an exception will be raised.
6511+
</dd>
6512+
</dl>
6513+
</dd>
6514+
</dl>
6515+
65376516
#### 🔌 Usage
65386517

65396518
<dl>
@@ -6622,7 +6601,10 @@ client.flows.upsert(
66226601
<dl>
66236602
<dd>
66246603

6625-
Log a Flow Trace.
6604+
Log to a Flow.
6605+
6606+
You can use query parameters `version_id`, or `environment`, to target
6607+
an existing version of the Flow. Otherwise, the default deployed version will be chosen.
66266608
</dd>
66276609
</dl>
66286610
</dd>
@@ -6802,47 +6784,47 @@ client.flows.log()
68026784
<dl>
68036785
<dd>
68046786

6805-
**trace_id:** `typing.Optional[str]` — ID of the Trace. If not provided, one will be assigned.
6787+
**trace_parent_id:** `typing.Optional[str]`The ID of the parent Log to nest this Log under in a Trace.
68066788

68076789
</dd>
68086790
</dl>
68096791

68106792
<dl>
68116793
<dd>
68126794

6813-
**trace_parent_log_id:** `typing.Optional[str]`Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
6795+
**batches:** `typing.Optional[typing.Sequence[str]]`Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
68146796

68156797
</dd>
68166798
</dl>
68176799

68186800
<dl>
68196801
<dd>
68206802

6821-
**batches:** `typing.Optional[typing.Sequence[str]]`Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
6803+
**user:** `typing.Optional[str]`End-user ID related to the Log.
68226804

68236805
</dd>
68246806
</dl>
68256807

68266808
<dl>
68276809
<dd>
68286810

6829-
**user:** `typing.Optional[str]`End-user ID related to the Log.
6811+
**flow_log_request_environment:** `typing.Optional[str]`The name of the Environment the Log is associated to.
68306812

68316813
</dd>
68326814
</dl>
68336815

68346816
<dl>
68356817
<dd>
68366818

6837-
**flow_log_request_environment:** `typing.Optional[str]`The name of the Environment the Log is associated to.
6819+
**save:** `typing.Optional[bool]`Whether the request/response payloads will be stored on Humanloop.
68386820

68396821
</dd>
68406822
</dl>
68416823

68426824
<dl>
68436825
<dd>
68446826

6845-
**save:** `typing.Optional[bool]`Whether the request/response payloads will be stored on Humanloop.
6827+
**trace_id:** `typing.Optional[str]`ID of the Trace. If not provided, one will be assigned.
68466828

68476829
</dd>
68486830
</dl>
@@ -6878,10 +6860,27 @@ client.flows.log()
68786860
</dl>
68796861
</details>
68806862

6881-
<details><summary><code>client.flows.<a href="src/humanloop/flows/client.py">update_trace</a>(...)</code></summary>
6863+
<details><summary><code>client.flows.<a href="src/humanloop/flows/client.py">update_log</a>(...)</code></summary>
68826864
<dl>
68836865
<dd>
68846866

6867+
#### 📝 Description
6868+
6869+
<dl>
6870+
<dd>
6871+
6872+
<dl>
6873+
<dd>
6874+
6875+
Update the status, inputs, output of a Flow Log.
6876+
6877+
Marking a Flow Log as complete will trigger any monitoring Evaluators to run.
6878+
Inputs and output (or error) must be provided in order to mark it as complete.
6879+
</dd>
6880+
</dl>
6881+
</dd>
6882+
</dl>
6883+
68856884
#### 🔌 Usage
68866885

68876886
<dl>
@@ -6896,9 +6895,9 @@ from humanloop import Humanloop
68966895
client = Humanloop(
68976896
api_key="YOUR_API_KEY",
68986897
)
6899-
client.flows.update_trace(
6900-
trace_id="trace_id",
6901-
status="complete",
6898+
client.flows.update_log(
6899+
log_id="log_id",
6900+
trace_status="complete",
69026901
)
69036902

69046903
```
@@ -6915,15 +6914,15 @@ client.flows.update_trace(
69156914
<dl>
69166915
<dd>
69176916

6918-
**trace_id:** `str` — Unique identifier for Trace.
6917+
**log_id:** `str` — Unique identifier of the Flow Log.
69196918

69206919
</dd>
69216920
</dl>
69226921

69236922
<dl>
69246923
<dd>
69256924

6926-
**status:** `TraceStatus` — Status of the Trace. When a Trace is marked as `complete`, no more Logs can be added to it. Monitoring Evaluators will only run on `complete` Traces.
6925+
**trace_status:** `TraceStatus` — Status of the Trace. When a Trace is marked as `complete`, no more Logs can be added to it. Monitoring Evaluators will only run on completed Traces.
69276926

69286927
</dd>
69296928
</dl>
@@ -6939,7 +6938,15 @@ client.flows.update_trace(
69396938
<dl>
69406939
<dd>
69416940

6942-
**output:** `typing.Optional[str]` — The output of the Flow Log.
6941+
**output:** `typing.Optional[str]` — The output of the Flow Log. Provide None to unset existing `output` value. Provide either this or `error`.
6942+
6943+
</dd>
6944+
</dl>
6945+
6946+
<dl>
6947+
<dd>
6948+
6949+
**error:** `typing.Optional[str]` — The error message of the Flow Log. Provide None to unset existing `error` value. Provide either this or `output`.
69436950

69446951
</dd>
69456952
</dl>

src/humanloop/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1616
headers: typing.Dict[str, str] = {
1717
"X-Fern-Language": "Python",
1818
"X-Fern-SDK-Name": "humanloop",
19-
"X-Fern-SDK-Version": "0.8.0b16",
19+
"X-Fern-SDK-Version": "0.8.0b17",
2020
}
2121
headers["X-API-KEY"] = self.api_key
2222
return headers

src/humanloop/datasets/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def move(
429429
request_options: typing.Optional[RequestOptions] = None,
430430
) -> DatasetResponse:
431431
"""
432-
Update the Dataset with the given ID.
432+
Move the Dataset to a different path or change the name.
433433
434434
Parameters
435435
----------
@@ -1458,7 +1458,7 @@ async def move(
14581458
request_options: typing.Optional[RequestOptions] = None,
14591459
) -> DatasetResponse:
14601460
"""
1461-
Update the Dataset with the given ID.
1461+
Move the Dataset to a different path or change the name.
14621462
14631463
Parameters
14641464
----------

src/humanloop/evaluators/client.py

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,7 @@ def log(
801801
source: typing.Optional[str] = OMIT,
802802
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
803803
source_datapoint_id: typing.Optional[str] = OMIT,
804-
trace_id: typing.Optional[str] = OMIT,
805-
trace_parent_log_id: typing.Optional[str] = OMIT,
804+
trace_parent_id: typing.Optional[str] = OMIT,
806805
batches: typing.Optional[typing.Sequence[str]] = OMIT,
807806
user: typing.Optional[str] = OMIT,
808807
create_evaluator_log_request_environment: typing.Optional[str] = OMIT,
@@ -872,11 +871,8 @@ def log(
872871
source_datapoint_id : typing.Optional[str]
873872
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.
874873
875-
trace_id : typing.Optional[str]
876-
Identifier of the Flow Log to which the Log will be associated. Multiple Logs can be associated by passing the same trace_id in subsequent log requests. Use the Flow File log endpoint to create the Trace first.
877-
878-
trace_parent_log_id : typing.Optional[str]
879-
Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
874+
trace_parent_id : typing.Optional[str]
875+
The ID of the parent Log to nest this Log under in a Trace.
880876
881877
batches : typing.Optional[typing.Sequence[str]]
882878
Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
@@ -938,8 +934,7 @@ def log(
938934
"metadata": metadata,
939935
"parent_id": parent_id,
940936
"source_datapoint_id": source_datapoint_id,
941-
"trace_id": trace_id,
942-
"trace_parent_log_id": trace_parent_log_id,
937+
"trace_parent_id": trace_parent_id,
943938
"batches": batches,
944939
"user": user,
945940
"environment": create_evaluator_log_request_environment,
@@ -1828,8 +1823,7 @@ async def log(
18281823
source: typing.Optional[str] = OMIT,
18291824
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
18301825
source_datapoint_id: typing.Optional[str] = OMIT,
1831-
trace_id: typing.Optional[str] = OMIT,
1832-
trace_parent_log_id: typing.Optional[str] = OMIT,
1826+
trace_parent_id: typing.Optional[str] = OMIT,
18331827
batches: typing.Optional[typing.Sequence[str]] = OMIT,
18341828
user: typing.Optional[str] = OMIT,
18351829
create_evaluator_log_request_environment: typing.Optional[str] = OMIT,
@@ -1899,11 +1893,8 @@ async def log(
18991893
source_datapoint_id : typing.Optional[str]
19001894
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.
19011895
1902-
trace_id : typing.Optional[str]
1903-
Identifier of the Flow Log to which the Log will be associated. Multiple Logs can be associated by passing the same trace_id in subsequent log requests. Use the Flow File log endpoint to create the Trace first.
1904-
1905-
trace_parent_log_id : typing.Optional[str]
1906-
Log under which this Log should be nested. Leave field blank if the Log should be nested directly under root Trace Log. Parent Log should already be added to the Trace.
1896+
trace_parent_id : typing.Optional[str]
1897+
The ID of the parent Log to nest this Log under in a Trace.
19071898
19081899
batches : typing.Optional[typing.Sequence[str]]
19091900
Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
@@ -1973,8 +1964,7 @@ async def main() -> None:
19731964
"metadata": metadata,
19741965
"parent_id": parent_id,
19751966
"source_datapoint_id": source_datapoint_id,
1976-
"trace_id": trace_id,
1977-
"trace_parent_log_id": trace_parent_log_id,
1967+
"trace_parent_id": trace_parent_id,
19781968
"batches": batches,
19791969
"user": user,
19801970
"environment": create_evaluator_log_request_environment,

0 commit comments

Comments
 (0)