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
Describe the bug
Adding responses to records does not show up in the UI but does appear if checking the response field of each record.
Stacktrace and Code to create the bug
settings = rg.Settings(
fields=[
rg.TextField(name="customer_question", title="Customer Question", description="The question from the customer"),
],
questions=[
rg.TextQuestion(name="answer_filled", title="Fill in the good answer"),
]
)
test_dataset = rg.Dataset(
name="test_dataset",
workspace=workspace_name,
client=client,
settings=settings
)
test_dataset.create()
owner = client.users("user")
records = [rg.Record(id=id, fields={"customer_question": question}, responses=[rg.Response(question_name="answer_filled", value=answer, user_id=owner.id, _record=id)]) for id, question, answer in zip(ids, questions, answers)]
test_dataset.records.log(records=records)
test_dataset.update()
for record in test_dataset.records:
print(record.fields["customer_question"])
for response in record.responses:
print(response.question_name, response.value)
Expected behavior
the response field in the UI should have the same value as the record in test_dataset.records.
Environment:
python 3.12.2
argilla 2.3.0
Additional context
Code run in a notebook
The text was updated successfully, but these errors were encountered:
Describe the bug
Adding responses to records does not show up in the UI but does appear if checking the response field of each record.
Stacktrace and Code to create the bug
settings = rg.Settings(
fields=[
rg.TextField(name="customer_question", title="Customer Question", description="The question from the customer"),
],
questions=[
rg.TextQuestion(name="answer_filled", title="Fill in the good answer"),
]
)
test_dataset = rg.Dataset(
name="test_dataset",
workspace=workspace_name,
client=client,
settings=settings
)
test_dataset.create()
owner = client.users("user")
records = [rg.Record(id=id, fields={"customer_question": question}, responses=[rg.Response(question_name="answer_filled", value=answer, user_id=owner.id, _record=id)]) for id, question, answer in zip(ids, questions, answers)]
test_dataset.records.log(records=records)
test_dataset.update()
for record in test_dataset.records:
print(record.fields["customer_question"])
for response in record.responses:
print(response.question_name, response.value)
Expected behavior
the response field in the UI should have the same value as the record in test_dataset.records.
Environment:
python 3.12.2
argilla 2.3.0
Additional context
Code run in a notebook
The text was updated successfully, but these errors were encountered: