LLMTraceAPI
The LLMTraceAPI object is returned by the API class and can be used to either update trace metadata or access all the data stored for a given trace.
Note it is not possible to instanciate a LLMTraceAPI object directly.
LLMTraceAPI ¶
LLMTraceAPI()
log_metadata ¶
log_metadata(metadata: Dict[str, JSONEncodable]) -> None
Update the metadata field for a trace, can be used to set or update metadata fields
Parameters:
metadata_dict
–Dict in the form of {"metadata_name": value, ...}. Nested metadata is supported.
log_user_feedback ¶
log_user_feedback(score: float) -> None
Log user feedback
Parameters:
score
(float
) –The feedback score. Can be either 0, 0.0, 1 or 1.0
Jul. 25, 2024