We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1d99c25 + 2d9f3d6 commit f9bb39eCopy full SHA for f9bb39e
src/cloudflare/internal/ai-api.ts
@@ -16,6 +16,7 @@ type AiSearchService = object;
16
interface Fetcher {
17
fetch: typeof fetch;
18
aiSearch: () => AiSearchService;
19
+ gateway: (gatewayId: string) => AiGateway;
20
}
21
22
interface AiError {
@@ -418,7 +419,10 @@ export class Ai {
418
419
return service.transform(files, options);
420
421
- gateway(gatewayId: string): AiGateway {
422
+ gateway(gatewayId: string, options?: { beta?: boolean }): AiGateway {
423
+ if (options?.beta === true) {
424
+ return this.#fetcher.gateway(gatewayId);
425
+ }
426
return new AiGateway(this.#fetcher, gatewayId);
427
428
0 commit comments