MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / rateInteraction

Method rateInteraction

server/src/db/addie-db.ts:1207–1233  ·  view source on GitHub ↗

* Rate an interaction

(
    id: string,
    rating: number,
    ratedBy: string,
    options: {
      notes?: string;
      outcome?: string;
      user_sentiment?: string;
      intent_category?: string;
    } = {}
  )

Source from the content-addressed store, hash-verified

1205 * Rate an interaction
1206 */
1207 async rateInteraction(
1208 id: string,
1209 rating: number,
1210 ratedBy: string,
1211 options: {
1212 notes?: string;
1213 outcome?: string;
1214 user_sentiment?: string;
1215 intent_category?: string;
1216 } = {}
1217 ): Promise<void> {
1218 await query(
1219 `UPDATE addie_interactions
1220 SET rating = $1, rating_by = $2, rating_notes = $3, rated_at = NOW(),
1221 outcome = $4, user_sentiment = $5, intent_category = $6
1222 WHERE id = $7`,
1223 [
1224 rating,
1225 ratedBy,
1226 options.notes || null,
1227 options.outcome || null,
1228 options.user_sentiment || null,
1229 options.intent_category || null,
1230 id,
1231 ]
1232 );
1233 }
1234
1235 // ============== Web Conversations Methods ==============
1236

Callers 2

createAddieAdminRouterFunction · 0.80

Calls 1

queryFunction · 0.85

Tested by

no test coverage detected