import * as t from "io-ts"; import type { TypeOf } from "io-ts"; import type { ModelApi, ModelRequestOptions } from "@typeDefs"; import { FnTemplate } from "../../utils/Template"; interface PenaltyOptions { scale: number; applyToWhitespaces?: boolean; applyToPunctuations?: boolean; applyToNumbers?: boolean; applyToStopwords?: boolean; applyToEmojis?: boolean; } /** * @category Ai21 Jurassic 2 * @category Requests */ export interface Ai21Jurassic2Options extends ModelRequestOptions { numResults?: number; maxTokens?: number; minTokens?: number; temperature?: number; topP?: number; topKReturn?: number; stopSequences?: string[]; countPenalty?: PenaltyOptions; presencePenalty?: PenaltyOptions; frequencyPenalty?: PenaltyOptions; } /** * @category Ai21 Jurassic 2 * @category Templates */ export declare const Ai21Jurassic2Template: FnTemplate; declare const Ai21Jurassic2ResponseCodec: t.TypeC<{ id: t.NumberC; prompt: t.TypeC<{ text: t.StringC; tokens: t.ArrayC; topTokens: t.UnionC<[t.Mixed, t.NullC, t.UndefinedC]>; textRange: t.TypeC<{ start: t.NumberC; end: t.NumberC; }>; }>>; }>; completions: t.ArrayC; topTokens: t.UnionC<[t.Mixed, t.NullC, t.UndefinedC]>; textRange: t.TypeC<{ start: t.NumberC; end: t.NumberC; }>; }>>; }>; finishReason: t.IntersectionC<[t.TypeC<{ reason: t.StringC; }>, t.PartialC<{ length: t.NumberC; }>]>; }>>; }>; /** * @category Ai21 Jurassic 2 * @category Responses */ export interface Ai21Jurassic2Response extends TypeOf { } export declare function isAi21Jurassic2Response(response: unknown): response is Ai21Jurassic2Response; export interface Ai21Jurassic2Api extends ModelApi { } /** * * ## Reference * [Ai21 Jurrassic 2](https://docs.ai21.com/reference/j2-complete-ref) * * ## Providers using this API * - {@link createAwsBedrockModelProvider | AWS Bedrock} * * @category APIs * @category Ai21 Jurassic 2 * @category Provider: AWS Bedrock * */ export declare const Ai21Jurassic2Api: Ai21Jurassic2Api; export {};