@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 43 lines 1.44 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:BatchDetectKeyPhrases` — extract key phrases for a batch of up to 25 documents in a single call.
7 *
8 * The response carries a `ResultList` (index-aligned with `TextList`) and an
9 * `ErrorList` for documents that could not be processed. Like all Comprehend
10 * real-time APIs the action has no resource-level IAM, so the binding takes
11 * no arguments and grants the action on `*`.
12 *
13 * ### Batch Real-Time Analysis
14 * **Example:** KeyPhrases for a Batch of Documents
15 * ```typescript
16 * // init
17 * const batchDetectKeyPhrases = yield* AWS.Comprehend.BatchDetectKeyPhrases();
18 *
19 * // runtime
20 * const result = yield* batchDetectKeyPhrases({
21 * TextList: ["I love this product!", "The delivery was late."],
22 * LanguageCode: "en",
23 * });
24 * // result.ResultList[0].KeyPhrases
25 * ```
26 *
27 * @binding
28 */
29 export interface BatchDetectKeyPhrases extends Binding.Service<
30 BatchDetectKeyPhrases,
31 "AWS.Comprehend.BatchDetectKeyPhrases",
32 () => Effect.Effect<
33 (
34 request: comprehend.BatchDetectKeyPhrasesRequest,
35 ) => Effect.Effect<
36 comprehend.BatchDetectKeyPhrasesResponse,
37 comprehend.BatchDetectKeyPhrasesError
38 >
39 >
40 > {}
41 export const BatchDetectKeyPhrases = Binding.Service<BatchDetectKeyPhrases>(
42 "AWS.Comprehend.BatchDetectKeyPhrases",
43 );