genkitx-mistral
Version:
Firebase Genkit AI framework plugin for Mistral AI APIs.
41 lines (38 loc) • 1.81 kB
TypeScript
import * as genkit from 'genkit';
import { z, Genkit } from 'genkit';
import { Mistral } from '@mistralai/mistralai';
declare const TextEmbeddingConfigSchema: z.ZodObject<{
embeddingTypes: z.ZodOptional<z.ZodLiteral<"float">>;
encodingFormat: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"float">, z.ZodLiteral<"base64">]>>;
}, "strip", z.ZodTypeAny, {
embeddingTypes?: "float" | undefined;
encodingFormat?: "float" | "base64" | undefined;
}, {
embeddingTypes?: "float" | undefined;
encodingFormat?: "float" | "base64" | undefined;
}>;
type TextEmbeddingConfig = z.infer<typeof TextEmbeddingConfigSchema>;
declare function mistralEmbedder(ai: Genkit, name: string, client: Mistral): void;
declare const mistralembed: genkit.EmbedderReference<z.ZodObject<{
embeddingTypes: z.ZodOptional<z.ZodLiteral<"float">>;
encodingFormat: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"float">, z.ZodLiteral<"base64">]>>;
}, "strip", z.ZodTypeAny, {
embeddingTypes?: "float" | undefined;
encodingFormat?: "float" | "base64" | undefined;
}, {
embeddingTypes?: "float" | undefined;
encodingFormat?: "float" | "base64" | undefined;
}>>;
declare const SUPPORTED_EMBEDDING_MODELS: {
'mistral-embed': genkit.EmbedderReference<z.ZodObject<{
embeddingTypes: z.ZodOptional<z.ZodLiteral<"float">>;
encodingFormat: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"float">, z.ZodLiteral<"base64">]>>;
}, "strip", z.ZodTypeAny, {
embeddingTypes?: "float" | undefined;
encodingFormat?: "float" | "base64" | undefined;
}, {
embeddingTypes?: "float" | undefined;
encodingFormat?: "float" | "base64" | undefined;
}>>;
};
export { SUPPORTED_EMBEDDING_MODELS, type TextEmbeddingConfig, TextEmbeddingConfigSchema, mistralEmbedder, mistralembed };