Skip to content

Commit 98ca87e

Browse files
committed
Release 0.8.0
1 parent bb128fc commit 98ca87e

19 files changed

+330
-290
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ response = client.prompts.call_stream(
190190
"2024-01-15 09:30:00+00:00",
191191
),
192192
source_datapoint_id="string",
193-
trace_parent_id="string",
193+
trace_id="string",
194+
trace_parent_log_id="string",
194195
batches=["string"],
195196
user="string",
196197
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.0b17"
3+
version = "0.8.0"
44
description = ""
55
readme = "README.md"
66
authors = []

reference.md

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

309-
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
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.
310318

311319
</dd>
312320
</dl>
@@ -711,7 +719,8 @@ response = client.prompts.call_stream(
711719
"2024-01-15 09:30:00+00:00",
712720
),
713721
source_datapoint_id="string",
714-
trace_parent_id="string",
722+
trace_id="string",
723+
trace_parent_log_id="string",
715724
batches=["string"],
716725
user="string",
717726
prompts_call_stream_request_environment="string",
@@ -858,7 +867,15 @@ Controls how the model uses tools. The following options are supported:
858867
<dl>
859868
<dd>
860869

861-
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
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.
862879

863880
</dd>
864881
</dl>
@@ -1124,7 +1141,15 @@ Controls how the model uses tools. The following options are supported:
11241141
<dl>
11251142
<dd>
11261143

1127-
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
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.
11281153

11291154
</dd>
11301155
</dl>
@@ -2540,7 +2565,15 @@ client.tools.log(
25402565
<dl>
25412566
<dd>
25422567

2543-
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
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.
25442577

25452578
</dd>
25462579
</dl>
@@ -4271,7 +4304,7 @@ client.datasets.delete(
42714304
<dl>
42724305
<dd>
42734306

4274-
Move the Dataset to a different path or change the name.
4307+
Update the Dataset with the given ID.
42754308
</dd>
42764309
</dl>
42774310
</dd>
@@ -6059,7 +6092,15 @@ client.evaluators.log(
60596092
<dl>
60606093
<dd>
60616094

6062-
**trace_parent_id:** `typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
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.
60636104

60646105
</dd>
60656106
</dl>
@@ -6393,7 +6434,7 @@ client.flows.move(
63936434
<dl>
63946435
<dd>
63956436

6396-
Get a list of Flows.
6437+
Get a list of all Flows.
63976438
</dd>
63986439
</dl>
63996440
</dd>
@@ -6493,26 +6534,6 @@ client.flows.list()
64936534
<dl>
64946535
<dd>
64956536

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-
65166537
#### 🔌 Usage
65176538

65186539
<dl>
@@ -6601,10 +6622,7 @@ client.flows.upsert(
66016622
<dl>
66026623
<dd>
66036624

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.
6625+
Log a Flow Trace.
66086626
</dd>
66096627
</dl>
66106628
</dd>
@@ -6784,47 +6802,47 @@ client.flows.log()
67846802
<dl>
67856803
<dd>
67866804

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

67896807
</dd>
67906808
</dl>
67916809

67926810
<dl>
67936811
<dd>
67946812

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
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.
67966814

67976815
</dd>
67986816
</dl>
67996817

68006818
<dl>
68016819
<dd>
68026820

6803-
**user:** `typing.Optional[str]`End-user ID related to the Log.
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
68046822

68056823
</dd>
68066824
</dl>
68076825

68086826
<dl>
68096827
<dd>
68106828

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

68136831
</dd>
68146832
</dl>
68156833

68166834
<dl>
68176835
<dd>
68186836

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

68216839
</dd>
68226840
</dl>
68236841

68246842
<dl>
68256843
<dd>
68266844

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

68296847
</dd>
68306848
</dl>
@@ -6860,27 +6878,10 @@ client.flows.log()
68606878
</dl>
68616879
</details>
68626880

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

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-
68846885
#### 🔌 Usage
68856886

68866887
<dl>
@@ -6895,9 +6896,9 @@ from humanloop import Humanloop
68956896
client = Humanloop(
68966897
api_key="YOUR_API_KEY",
68976898
)
6898-
client.flows.update_log(
6899-
log_id="log_id",
6900-
trace_status="complete",
6899+
client.flows.update_trace(
6900+
trace_id="trace_id",
6901+
status="complete",
69016902
)
69026903

69036904
```
@@ -6914,15 +6915,15 @@ client.flows.update_log(
69146915
<dl>
69156916
<dd>
69166917

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

69196920
</dd>
69206921
</dl>
69216922

69226923
<dl>
69236924
<dd>
69246925

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.
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.
69266927

69276928
</dd>
69286929
</dl>
@@ -6938,15 +6939,7 @@ client.flows.update_log(
69386939
<dl>
69396940
<dd>
69406941

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`.
6942+
**output:** `typing.Optional[str]` — The output of the Flow Log.
69506943

69516944
</dd>
69526945
</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.0b17",
19+
"X-Fern-SDK-Version": "0.8.0",
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-
Move the Dataset to a different path or change the name.
432+
Update the Dataset with the given ID.
433433
434434
Parameters
435435
----------
@@ -1458,7 +1458,7 @@ async def move(
14581458
request_options: typing.Optional[RequestOptions] = None,
14591459
) -> DatasetResponse:
14601460
"""
1461-
Move the Dataset to a different path or change the name.
1461+
Update the Dataset with the given ID.
14621462
14631463
Parameters
14641464
----------

src/humanloop/evaluators/client.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,8 @@ 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_parent_id: typing.Optional[str] = OMIT,
804+
trace_id: typing.Optional[str] = OMIT,
805+
trace_parent_log_id: typing.Optional[str] = OMIT,
805806
batches: typing.Optional[typing.Sequence[str]] = OMIT,
806807
user: typing.Optional[str] = OMIT,
807808
create_evaluator_log_request_environment: typing.Optional[str] = OMIT,
@@ -871,8 +872,11 @@ def log(
871872
source_datapoint_id : typing.Optional[str]
872873
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.
873874
874-
trace_parent_id : typing.Optional[str]
875-
The ID of the parent Log to nest this Log under in a Trace.
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.
876880
877881
batches : typing.Optional[typing.Sequence[str]]
878882
Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
@@ -934,7 +938,8 @@ def log(
934938
"metadata": metadata,
935939
"parent_id": parent_id,
936940
"source_datapoint_id": source_datapoint_id,
937-
"trace_parent_id": trace_parent_id,
941+
"trace_id": trace_id,
942+
"trace_parent_log_id": trace_parent_log_id,
938943
"batches": batches,
939944
"user": user,
940945
"environment": create_evaluator_log_request_environment,
@@ -1823,7 +1828,8 @@ async def log(
18231828
source: typing.Optional[str] = OMIT,
18241829
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
18251830
source_datapoint_id: typing.Optional[str] = OMIT,
1826-
trace_parent_id: typing.Optional[str] = OMIT,
1831+
trace_id: typing.Optional[str] = OMIT,
1832+
trace_parent_log_id: typing.Optional[str] = OMIT,
18271833
batches: typing.Optional[typing.Sequence[str]] = OMIT,
18281834
user: typing.Optional[str] = OMIT,
18291835
create_evaluator_log_request_environment: typing.Optional[str] = OMIT,
@@ -1893,8 +1899,11 @@ async def log(
18931899
source_datapoint_id : typing.Optional[str]
18941900
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.
18951901
1896-
trace_parent_id : typing.Optional[str]
1897-
The ID of the parent Log to nest this Log under in a Trace.
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.
18981907
18991908
batches : typing.Optional[typing.Sequence[str]]
19001909
Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
@@ -1964,7 +1973,8 @@ async def main() -> None:
19641973
"metadata": metadata,
19651974
"parent_id": parent_id,
19661975
"source_datapoint_id": source_datapoint_id,
1967-
"trace_parent_id": trace_parent_id,
1976+
"trace_id": trace_id,
1977+
"trace_parent_log_id": trace_parent_log_id,
19681978
"batches": batches,
19691979
"user": user,
19701980
"environment": create_evaluator_log_request_environment,

0 commit comments

Comments
 (0)