@genkit-ai/core
Version:
Genkit AI framework core libraries.
95 lines • 2.15 kB
JavaScript
import { version } from "./__codegen/version.mjs";
const GENKIT_VERSION = version;
const GENKIT_CLIENT_HEADER = `genkit-node/${GENKIT_VERSION} gl-node/${process.versions.node}`;
const GENKIT_REFLECTION_API_SPEC_VERSION = 1;
import { z } from "zod";
export * from "./action.mjs";
import { getAsyncContext } from "./async-context.mjs";
import {
OperationSchema,
backgroundAction,
defineBackgroundAction,
isBackgroundAction,
registerBackgroundAction
} from "./background-action.mjs";
import {
getGenkitRuntimeConfig,
resetGenkitRuntimeConfig,
setGenkitRuntimeConfig
} from "./config.mjs";
import {
apiKey,
getContext,
runWithContext
} from "./context.mjs";
import {
defineDynamicActionProvider
} from "./dynamic-action-provider.mjs";
import {
GenkitError,
UnstableApiError,
UserFacingError,
assertUnstable,
getCallableJSON,
getHttpStatus
} from "./error.mjs";
import {
defineFlow,
flow,
run
} from "./flow.mjs";
export * from "./plugin.mjs";
export * from "./reflection.mjs";
import {
annotateSchema,
defineJsonSchema,
defineSchema,
toJsonSchema
} from "./schema.mjs";
export * from "./telemetryTypes.mjs";
export * from "./utils.mjs";
const clientHeaderGlobalKey = "__genkit_ClientHeader";
function getClientHeader() {
if (global[clientHeaderGlobalKey]) {
return GENKIT_CLIENT_HEADER + " " + global[clientHeaderGlobalKey];
}
return GENKIT_CLIENT_HEADER;
}
function setClientHeader(header) {
global[clientHeaderGlobalKey] = header;
}
export {
GENKIT_CLIENT_HEADER,
GENKIT_REFLECTION_API_SPEC_VERSION,
GENKIT_VERSION,
GenkitError,
OperationSchema,
UnstableApiError,
UserFacingError,
annotateSchema,
apiKey,
assertUnstable,
backgroundAction,
defineBackgroundAction,
defineDynamicActionProvider,
defineFlow,
defineJsonSchema,
defineSchema,
flow,
getAsyncContext,
getCallableJSON,
getClientHeader,
getContext,
getGenkitRuntimeConfig,
getHttpStatus,
isBackgroundAction,
registerBackgroundAction,
resetGenkitRuntimeConfig,
run,
runWithContext,
setClientHeader,
setGenkitRuntimeConfig,
toJsonSchema,
z
};
//# sourceMappingURL=index.mjs.map