From e8d2de1c99a8cef98ad5c460baf263cc06e3b769 Mon Sep 17 00:00:00 2001 From: djl11 Date: Sat, 22 Feb 2025 19:55:27 +0700 Subject: [PATCH] added param version image. --- demo_testing/params_demo.py | 4 ++++ logging/parameters.mdx | 22 +++++----------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/demo_testing/params_demo.py b/demo_testing/params_demo.py index fd0815df7..7742b1cd2 100644 --- a/demo_testing/params_demo.py +++ b/demo_testing/params_demo.py @@ -10,3 +10,7 @@ answer="The capital of France is Paris.", score=1.0 ) + +import json +log = unify.get_log_by_id(log.id) +print(json.dumps(log.params, indent=4)) diff --git a/logging/parameters.mdx b/logging/parameters.mdx index a08f50ea1..6e4d61903 100644 --- a/logging/parameters.mdx +++ b/logging/parameters.mdx @@ -25,26 +25,14 @@ They are always shown on the left hand side of the table. -When retrieving logs, parameters are returned as a `(version, value)` tuple. - -```python -import json -log = unify.get_log_by_id(log.id) -print(json.dumps(log.params, indent=4)) -``` -``` -{ - "system_message": [ - "0", - "You are a helpful assistant." - ] -} -``` - -The version is a string, which is simply an incrementing integer. +Parameter versions are of type string, and the version is simply an incrementing integer. In future, we plan to support custom version naming, thus the choice of a *string* type rather than an *integer*. +You can see the version of a paramter in the view pane. + + + ## Parameter Contexts As with entries, parameters can be used as a context manager.