File size: 902 Bytes
1727091
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""Compatibility shim for review persistence.

The canonical persistence layer is `store`; this module keeps older imports
working for callers that still use the feedback package.
"""
from __future__ import annotations

from store import export_reviews, save_review

RATINGS = [
    "Absolutely right",
    "Mostly right",
    "Partially right (mixed)",
    "Mostly wrong",
    "Absolutely wrong",
]


def save_feedback(
    *,
    ts: str,
    inchikey: str,
    guest_name: str,
    rating: str,
    comment: str,
    reviewer: str = "",
    model: str = "",
    prompt_version: str = "",
) -> int:
    return save_review(
        ts=ts,
        inchikey=inchikey,
        guest_name=guest_name,
        model=model,
        prompt_version=prompt_version,
        rating=rating,
        comment=comment,
        reviewer=reviewer,
    )


def export_rows() -> list[dict]:
    return export_reviews()