INNER CODE UNIT · Python
score
meetbryce/open-source-slack-ai · ossai/handlers.py:33
score = -1.0
elif action_id == "helpful_button":
score = 1.0
elif action_id == "very_helpful_button":
score = 2.0
client.create_feedback(
run_id,
project_id=os.environ.get("LANGSMITH_PROJECT_ID"),
key="user_feedback",
score=score,
comment=f"Feedback from action: {action_id}",
)
@catch_errors_dm_user
async def handler_shortcuts(
slack_context: SlackContext, is_private: bool, payload, say, user_id: str