Skip to main content

Create a score

score = await client.api.create_score(
            step_id="<STEP_UUID>", 
            generation_id="<GENERATION_UUID>"
            type="HUMAN",
            name="user-feedback",
            value=1,
            comment="Hello world",
        )
A score is tied to either a Step or a Generation. Exactly one of the two IDs below is required.
step_id
uuid
required
Step id in string format
generation_id
uuid
required
Generation id in string format
type
ScoreType
required
Type of score: AI or HUMAN
name
str
Name in string format
value
float
Value as float
comment
str
Comment in string format

Return type

score
Score
Return a Score

Update a score


score = await client.api.update_score(
    id="<SCORE_UUID>",
    update_params={
        "comment": "Hi world",
    },
)

id
uuid
required
Id in string format
update_params
dict
Dict containing same parameters as create_score

Return type

score
Score
Return a Score
I