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
+76-19Lines changed: 76 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -306,6 +306,14 @@ Controls how the model uses tools. The following options are supported:
306
306
<dl>
307
307
<dd>
308
308
309
+
**log_status:**`typing.Optional[LogStatus]` — Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
310
+
311
+
</dd>
312
+
</dl>
313
+
314
+
<dl>
315
+
<dd>
316
+
309
317
**source_datapoint_id:**`typing.Optional[str]` — 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.
310
318
311
319
</dd>
@@ -609,6 +617,14 @@ Controls how the model uses tools. The following options are supported:
609
617
<dl>
610
618
<dd>
611
619
620
+
**log_status:**`typing.Optional[LogStatus]` — Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
@@ -784,6 +800,14 @@ Controls how the model uses tools. The following options are supported:
784
800
<dl>
785
801
<dd>
786
802
803
+
**log_status:**`typing.Optional[LogStatus]` — Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
804
+
805
+
</dd>
806
+
</dl>
807
+
808
+
<dl>
809
+
<dd>
810
+
787
811
**source_datapoint_id:**`typing.Optional[str]` — 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.
788
812
789
813
</dd>
@@ -1050,6 +1074,14 @@ Controls how the model uses tools. The following options are supported:
1050
1074
<dl>
1051
1075
<dd>
1052
1076
1077
+
**log_status:**`typing.Optional[LogStatus]` — Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
1078
+
1079
+
</dd>
1080
+
</dl>
1081
+
1082
+
<dl>
1083
+
<dd>
1084
+
1053
1085
**source_datapoint_id:**`typing.Optional[str]` — 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.
1054
1086
1055
1087
</dd>
@@ -2684,6 +2716,14 @@ client.tools.log(
2684
2716
<dl>
2685
2717
<dd>
2686
2718
2719
+
**log_status:**`typing.Optional[LogStatus]` — Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
2720
+
2721
+
</dd>
2722
+
</dl>
2723
+
2724
+
<dl>
2725
+
<dd>
2726
+
2687
2727
**source_datapoint_id:**`typing.Optional[str]` — 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.
2688
2728
2689
2729
</dd>
@@ -2917,6 +2957,14 @@ client.tools.update(
2917
2957
<dl>
2918
2958
<dd>
2919
2959
2960
+
**log_status:**`typing.Optional[LogStatus]` — Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
**log_status:**`typing.Optional[LogStatus]` — Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
5542
+
5543
+
</dd>
5544
+
</dl>
5545
+
5546
+
<dl>
5547
+
<dd>
5548
+
5493
5549
**source_datapoint_id:**`typing.Optional[str]` — 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.
5494
5550
5495
5551
</dd>
@@ -6659,7 +6715,7 @@ Log to a Flow.
6659
6715
You can use query parameters `version_id`, or `environment`, to target
6660
6716
an existing version of the Flow. Otherwise, the default deployed version will be chosen.
6661
6717
6662
-
If you create the Flow Log with a `trace_status` of `incomplete`, you should later update it to `complete`
6718
+
If you create the Flow Log with a `log_status` of `incomplete`, you should later update it to `complete`
6663
6719
in order to trigger Evaluators.
6664
6720
</dd>
6665
6721
</dl>
@@ -6683,7 +6739,6 @@ client = Humanloop(
6683
6739
api_key="YOUR_API_KEY",
6684
6740
)
6685
6741
client.flows.log(
6686
-
log_id="medqa_experiment_0001",
6687
6742
id="fl_6o701g4jmcanPVHxdqD0O",
6688
6743
flow={
6689
6744
"attributes": {
@@ -6703,7 +6758,7 @@ client.flows.log(
6703
6758
"question": "Patient with a history of diabetes and hypertension presents with chest pain and shortness of breath."
6704
6759
},
6705
6760
output="The patient is likely experiencing a myocardial infarction. Immediate medical attention is required.",
6706
-
trace_status="incomplete",
6761
+
log_status="incomplete",
6707
6762
start_time=datetime.datetime.fromisoformat(
6708
6763
"2024-07-08 21:40:35+00:00",
6709
6764
),
@@ -6878,63 +6933,63 @@ client.flows.log(
6878
6933
<dl>
6879
6934
<dd>
6880
6935
6881
-
**source_datapoint_id:**`typing.Optional[str]` — 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.
6936
+
**log_status:**`typing.Optional[LogStatus]` — Status of the Flow Log. When a Log is updated from`incomplete` to `complete`, it becomes available to Monitoring Evaluators. Flow Logs cannot have an unspecified status: they must start as `incomplete` to allow children to be added. Provide `complete` if you don't intend to add children to the trace.
6882
6937
6883
6938
</dd>
6884
6939
</dl>
6885
6940
6886
6941
<dl>
6887
6942
<dd>
6888
6943
6889
-
**trace_parent_id:**`typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
6944
+
**source_datapoint_id:**`typing.Optional[str]` — 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.
6890
6945
6891
6946
</dd>
6892
6947
</dl>
6893
6948
6894
6949
<dl>
6895
6950
<dd>
6896
6951
6897
-
**user:**`typing.Optional[str]` — End-user ID related to the Log.
6952
+
**trace_parent_id:**`typing.Optional[str]` — The ID of the parent Log to nest this Log under in a Trace.
6898
6953
6899
6954
</dd>
6900
6955
</dl>
6901
6956
6902
6957
<dl>
6903
6958
<dd>
6904
6959
6905
-
**flow_log_request_environment:**`typing.Optional[str]` — The name of the Environment the Log is associated to.
6960
+
**user:**`typing.Optional[str]` — End-user ID related to the Log.
6906
6961
6907
6962
</dd>
6908
6963
</dl>
6909
6964
6910
6965
<dl>
6911
6966
<dd>
6912
6967
6913
-
**save:**`typing.Optional[bool]` — Whether the request/response payloads will be stored on Humanloop.
6968
+
**flow_log_request_environment:**`typing.Optional[str]` — The name of the Environment the Log is associated to.
6914
6969
6915
6970
</dd>
6916
6971
</dl>
6917
6972
6918
6973
<dl>
6919
6974
<dd>
6920
6975
6921
-
**log_id:**`typing.Optional[str]` — This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you.
6976
+
**save:**`typing.Optional[bool]` — Whether the request/response payloads will be stored on Humanloop.
6922
6977
6923
6978
</dd>
6924
6979
</dl>
6925
6980
6926
6981
<dl>
6927
6982
<dd>
6928
6983
6929
-
**flow:**`typing.Optional[FlowKernelRequestParams]` — Flow used to generate the Trace.
6984
+
**log_id:**`typing.Optional[str]` — This will identify a Log. If you don't provide a Log ID, Humanloop will generate one for you.
6930
6985
6931
6986
</dd>
6932
6987
</dl>
6933
6988
6934
6989
<dl>
6935
6990
<dd>
6936
6991
6937
-
**trace_status:**`typing.Optional[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. If you do not intend to add more Logs to the Trace after creation, set this to `complete`.
6992
+
**flow:**`typing.Optional[FlowKernelRequestParams]` — Flow used to generate the Trace.
6938
6993
6939
6994
</dd>
6940
6995
</dl>
@@ -6997,7 +7052,7 @@ client.flows.update_log(
6997
7052
"question": "Patient with a history of diabetes and normal tension presents with chest pain and shortness of breath."
6998
7053
},
6999
7054
output="The patient is likely experiencing a myocardial infarction. Immediate medical attention is required.",
7000
-
trace_status="complete",
7055
+
log_status="complete",
7001
7056
)
7002
7057
7003
7058
```
@@ -7022,47 +7077,47 @@ client.flows.update_log(
7022
7077
<dl>
7023
7078
<dd>
7024
7079
7025
-
**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.
7080
+
**messages:**`typing.Optional[typing.Sequence[ChatMessageParams]]` — List of chat messages that were used as an input to the Flow.
7026
7081
7027
7082
</dd>
7028
7083
</dl>
7029
7084
7030
7085
<dl>
7031
7086
<dd>
7032
7087
7033
-
**messages:**`typing.Optional[typing.Sequence[ChatMessageParams]]` — List of chat messages that were used as an input to the Flow.
7088
+
**output_message:**`typing.Optional[ChatMessageParams]` — The output message returned by this Flow.
7034
7089
7035
7090
</dd>
7036
7091
</dl>
7037
7092
7038
7093
<dl>
7039
7094
<dd>
7040
7095
7041
-
**output_message:**`typing.Optional[ChatMessageParams]` — The output message returned by this Flow.
7096
+
**inputs:**`typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — The inputs passed to the Flow Log.
7042
7097
7043
7098
</dd>
7044
7099
</dl>
7045
7100
7046
7101
<dl>
7047
7102
<dd>
7048
7103
7049
-
**inputs:**`typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — The inputs passed to the Flow Log.
7104
+
**output:**`typing.Optional[str]` — The output of the Flow Log. Provide None to unset existing `output` value. Provide either this, `output_message` or `error`.
7050
7105
7051
7106
</dd>
7052
7107
</dl>
7053
7108
7054
7109
<dl>
7055
7110
<dd>
7056
7111
7057
-
**output:**`typing.Optional[str]` — The output of the Flow Log. Provide None to unset existing `output` value. Provide either this, `output_message` or `error`.
7112
+
**error:**`typing.Optional[str]` — The error message of the Flow Log. Provide None to unset existing `error` value. Provide either this, `output_message` or `output`.
7058
7113
7059
7114
</dd>
7060
7115
</dl>
7061
7116
7062
7117
<dl>
7063
7118
<dd>
7064
7119
7065
-
**error:**`typing.Optional[str]` — The error message of the Flow Log. Provide None to unset existing `error` value. Provide either this, `output_message` or `output`.
7120
+
**log_status:**`typing.Optional[LogStatus]` — Status of the Flow Log. When a Flow Log is updated to `complete`, no more Logs can be added to it. Monitoring Evaluators will only run on `complete` Flow Logs.
7066
7121
7067
7122
</dd>
7068
7123
</dl>
@@ -10151,7 +10206,9 @@ from humanloop import Humanloop
Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
138
+
134
139
source_datapoint_id : typing.Optional[str]
135
140
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.
Status of a Log. Set to `incomplete` if you intend to update and eventually complete the Log and want the File's monitoring Evaluators to wait until you mark it as `complete`. If log_status is not provided, observability will pick up the Log as soon as possible. Updating this from specified to unspecified is undefined behavior.
1247
+
1238
1248
source_datapoint_id : typing.Optional[str]
1239
1249
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.
0 commit comments