UNPKG

axiom

Version:

Axiom AI SDK provides - an API to wrap your AI calls with observability instrumentation. - offline evals - online evals

42 lines (26 loc) 847 B
[**axiom v0.51.1**](../../README.md) *** [axiom](../../README.md) / [config](../README.md) / defineConfig # Function: defineConfig() > **defineConfig**(`config`): [`AxiomConfig`](../interfaces/AxiomConfig.md) Type-safe helper for defining Axiom configuration. ## Parameters ### config [`AxiomConfig`](../interfaces/AxiomConfig.md) The configuration object ## Returns [`AxiomConfig`](../interfaces/AxiomConfig.md) The same configuration object with type checking ## Example ```typescript import { defineConfig } from 'axiom/ai/config'; export default defineConfig({ eval: { url: process.env.AXIOM_URL, token: process.env.AXIOM_TOKEN, dataset: process.env.AXIOM_DATASET, include: ['**/*.eval.{ts,js}'], instrumentation: ({ url, token, dataset }) => setupAppInstrumentation({ url, token, dataset }), }, }); ```