The best way to control Claude Code, Codex and more from any computer or phone

main
ts 41 lines 1.34 KB
Raw
1 import type * as comprehend from "@distilled.cloud/aws/comprehend";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `comprehend:DetectSentiment` — infer the prevailing
7 * sentiment of a piece of text (`POSITIVE`, `NEGATIVE`, `NEUTRAL`, or
8 * `MIXED`).
9 *
10 * Comprehend's synchronous detect APIs are pure pay-per-call with no
11 * resource to manage: the binding takes no arguments and grants the
12 * function `comprehend:DetectSentiment` (the action has no resource-level
13 * IAM).
14 *
15 * ### Real-Time Analysis
16 * **Example:** Detect Sentiment of a Sentence
17 * ```typescript
18 * // init
19 * const detectSentiment = yield* AWS.Comprehend.DetectSentiment();
20 *
21 * // runtime
22 * const result = yield* detectSentiment({
23 * Text: "I love this product, it works wonderfully!",
24 * LanguageCode: "en",
25 * });
26 * // result.Sentiment === "POSITIVE"
27 * // result.SentimentScore.Positive ~ 0.99
28 * ```
29 *
30 * @binding
31 */
32 export interface DetectSentiment extends Binding.Service<
33 DetectSentiment,
34 "AWS.Comprehend.DetectSentiment",
35 () => Effect.Effect<
36 (
37 request: comprehend.DetectSentimentRequest,
38 ) => Effect.Effect<comprehend.DetectSentimentResponse, comprehend.DetectSentimentError>
39 >
40 > {}
41 export const DetectSentiment = Binding.Service<DetectSentiment>("AWS.Comprehend.DetectSentiment");