@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, 06:00 UTC

main
ts 53 lines 1.66 KB
Raw
1 import type * as qbusiness from "@distilled.cloud/aws/qbusiness";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Application } from "./Application.ts";
5
6 /**
7 * `SearchRelevantContent` request with `applicationId` injected from the bound application.
8 */
9 export interface SearchRelevantContentRequest extends Omit<
10 qbusiness.SearchRelevantContentRequest,
11 "applicationId"
12 > {}
13
14 /**
15 * Runtime binding for the `SearchRelevantContent` operation (IAM action
16 * `qbusiness:SearchRelevantContent`), scoped to one {@link Application}.
17 *
18 * Searches an application's indexed content through a retriever and
19 * returns the relevant passages without generating an answer — the
20 * RAG retrieval half on its own.
21 * Provide the implementation with
22 * `Effect.provide(AWS.QBusiness.SearchRelevantContentHttp)`.
23 *
24 * ### Content Retrieval
25 * **Example:** Retrieve Relevant Passages
26 * ```typescript
27 * const search = yield* AWS.QBusiness.SearchRelevantContent(app);
28 *
29 * const results = yield* search({
30 * queryText: "expense reimbursement deadline",
31 * contentSource: { retriever: { retrieverId: retriever.retrieverId } },
32 * });
33 * ```
34 *
35 * @binding
36 */
37 export interface SearchRelevantContent extends Binding.Service<
38 SearchRelevantContent,
39 "AWS.QBusiness.SearchRelevantContent",
40 (
41 application: Application,
42 ) => Effect.Effect<
43 (
44 request: SearchRelevantContentRequest,
45 ) => Effect.Effect<
46 qbusiness.SearchRelevantContentResponse,
47 qbusiness.SearchRelevantContentError
48 >
49 >
50 > {}
51 export const SearchRelevantContent = Binding.Service<SearchRelevantContent>(
52 "AWS.QBusiness.SearchRelevantContent",
53 );