Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to literal score #851

Merged
merged 10 commits into from Mar 30, 2024
Merged

migrate to literal score #851

merged 10 commits into from Mar 30, 2024

Conversation

willydouhard
Copy link
Collaborator

No description provided.

Comment on lines +36 to +37
feedback: Optional[Literal[0, 1]] = None
userId: Optional[str] = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willydouhard why is -1 being removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 becomes 0 and we introduce the concept of "feedback deletion" to replace the current 0 purpose. Having 3 values was a workaround to avoid to handle feedback deletion

Comment on lines 151 to 163
class FeedbackDict(TypedDict):
value: Literal[-1, 0, 1]
strategy: FeedbackStrategy
forId: str
id: Optional[str]
value: Literal[0, 1]
comment: Optional[str]


@dataclass
class Feedback:
forId: str
value: Literal[-1, 0, 1]
strategy: FeedbackStrategy = "BINARY"
value: Literal[0, 1]
id: Optional[str] = None
comment: Optional[str] = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@willydouhard why are these changing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chainlit is only supporting binary feedback so this was never used throughout the project.

@willydouhard willydouhard merged commit 942944e into main Mar 30, 2024
4 checks passed
@willydouhard willydouhard deleted the wd/literal-score branch March 30, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants