You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference.md
+63-70Lines changed: 63 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -306,7 +306,15 @@ Controls how the model uses tools. The following options are supported:
306
306
<dl>
307
307
<dd>
308
308
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.
@@ -858,7 +867,15 @@ Controls how the model uses tools. The following options are supported:
858
867
<dl>
859
868
<dd>
860
869
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.
862
879
863
880
</dd>
864
881
</dl>
@@ -1124,7 +1141,15 @@ Controls how the model uses tools. The following options are supported:
1124
1141
<dl>
1125
1142
<dd>
1126
1143
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.
1128
1153
1129
1154
</dd>
1130
1155
</dl>
@@ -2540,7 +2565,15 @@ client.tools.log(
2540
2565
<dl>
2541
2566
<dd>
2542
2567
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.
2544
2577
2545
2578
</dd>
2546
2579
</dl>
@@ -4271,7 +4304,7 @@ client.datasets.delete(
4271
4304
<dl>
4272
4305
<dd>
4273
4306
4274
-
Move the Dataset to a different path or change the name.
4307
+
Update the Dataset with the given ID.
4275
4308
</dd>
4276
4309
</dl>
4277
4310
</dd>
@@ -6059,7 +6092,15 @@ client.evaluators.log(
6059
6092
<dl>
6060
6093
<dd>
6061
6094
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.
6063
6104
6064
6105
</dd>
6065
6106
</dl>
@@ -6393,7 +6434,7 @@ client.flows.move(
6393
6434
<dl>
6394
6435
<dd>
6395
6436
6396
-
Get a list of Flows.
6437
+
Get a list of all Flows.
6397
6438
</dd>
6398
6439
</dl>
6399
6440
</dd>
@@ -6493,26 +6534,6 @@ client.flows.list()
6493
6534
<dl>
6494
6535
<dd>
6495
6536
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
-
6516
6537
#### 🔌 Usage
6517
6538
6518
6539
<dl>
@@ -6601,10 +6622,7 @@ client.flows.upsert(
6601
6622
<dl>
6602
6623
<dd>
6603
6624
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.
6608
6626
</dd>
6609
6627
</dl>
6610
6628
</dd>
@@ -6784,47 +6802,47 @@ client.flows.log()
6784
6802
<dl>
6785
6803
<dd>
6786
6804
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.
6788
6806
6789
6807
</dd>
6790
6808
</dl>
6791
6809
6792
6810
<dl>
6793
6811
<dd>
6794
6812
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.
6796
6814
6797
6815
</dd>
6798
6816
</dl>
6799
6817
6800
6818
<dl>
6801
6819
<dd>
6802
6820
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
6804
6822
6805
6823
</dd>
6806
6824
</dl>
6807
6825
6808
6826
<dl>
6809
6827
<dd>
6810
6828
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.
6812
6830
6813
6831
</dd>
6814
6832
</dl>
6815
6833
6816
6834
<dl>
6817
6835
<dd>
6818
6836
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.
6820
6838
6821
6839
</dd>
6822
6840
</dl>
6823
6841
6824
6842
<dl>
6825
6843
<dd>
6826
6844
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.
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
-
6884
6885
#### 🔌 Usage
6885
6886
6886
6887
<dl>
@@ -6895,9 +6896,9 @@ from humanloop import Humanloop
6895
6896
client = Humanloop(
6896
6897
api_key="YOUR_API_KEY",
6897
6898
)
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",
6901
6902
)
6902
6903
6903
6904
```
@@ -6914,15 +6915,15 @@ client.flows.update_log(
6914
6915
<dl>
6915
6916
<dd>
6916
6917
6917
-
**log_id:**`str` — Unique identifier of the Flow Log.
6918
+
**trace_id:**`str` — Unique identifier for Trace.
6918
6919
6919
6920
</dd>
6920
6921
</dl>
6921
6922
6922
6923
<dl>
6923
6924
<dd>
6924
6925
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.
6926
6927
6927
6928
</dd>
6928
6929
</dl>
@@ -6938,15 +6939,7 @@ client.flows.update_log(
6938
6939
<dl>
6939
6940
<dd>
6940
6941
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.
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.
873
874
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.
876
880
877
881
batches : typing.Optional[typing.Sequence[str]]
878
882
Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
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.
1895
1901
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.
1898
1907
1899
1908
batches : typing.Optional[typing.Sequence[str]]
1900
1909
Array of Batch Ids that this log is part of. Batches are used to group Logs together for offline Evaluations
0 commit comments