axiom
Version:
Axiom AI SDK provides - an API to wrap your AI calls with observability instrumentation. - offline evals - online evals
140 lines (90 loc) • 2.53 kB
Markdown
[**axiom v0.51.1**](../../README.md)
***
[axiom](../../README.md) / [config](../README.md) / AxiomConfig
# Interface: AxiomConfig
Axiom AI SDK configuration with optional environment-specific overrides.
Supports c12 environment overrides using $development, $production, etc.
## Example
```typescript
export default defineConfig({
eval: {
url: process.env.AXIOM_URL,
token: process.env.AXIOM_TOKEN,
dataset: process.env.AXIOM_DATASET,
},
})
```
## Extends
- `AxiomConfigBase`
## Indexable
\[`key`: `` `$${string}` ``\]: `Partial`\<`AxiomConfigBase`\> \| `undefined`
Allow c12 environment-specific overrides ($development, $production, $test etc.)
but don't show them in autocomplete for now
## Properties
### eval?
> `optional` **eval**: `AxiomConnectionConfig` & `object`
Eval configuration settings
#### Type Declaration
##### exclude?
> `optional` **exclude**: `string`[]
Glob patterns to exclude when running evals
###### Default
```ts
['**/node_modules/**', '**/dist/**', '**/build/**']
```
###### Example
```ts
['**/node_modules/**', '**/.next/**']
```
##### flagSchema?
> `optional` **flagSchema**: `ZodObject`\<`any`, `$strip`\> \| `null`
Zod schema for flag validation.
When provided, CLI flags (--flag.*) are validated against this schema
before eval execution begins.
###### Example
```typescript
import { z } from 'zod';
export default defineConfig({
eval: {
flagSchema: z.object({
model: z.object({
temperature: z.number().min(0).max(2).default(0.7),
name: z.string().default('gpt-4o'),
}),
}),
}
});
```
##### include?
> `optional` **include**: `string`[]
Glob patterns to include when running evals
###### Default
```ts
['**/*.eval.{ts,js,mts,mjs,cts,cjs}']
```
###### Example
```ts
['**/*.eval.ts', 'tests/**/*.test.ts']
```
##### instrumentation?
> `optional` **instrumentation**: [`AxiomEvalInstrumentationHook`](../type-aliases/AxiomEvalInstrumentationHook.md) \| `null`
Optional hook to initialize application OpenTelemetry instrumentation.
Called before eval execution with resolved Axiom connection details.
Return your configured tracer provider/tracer (or void) after registering them.
##### timeoutMs?
> `optional` **timeoutMs**: `number`
Timeout for eval execution in milliseconds
###### Default
```ts
60000
```
#### Example
```typescript
eval: {
url: process.env.AXIOM_URL,
token: process.env.AXIOM_TOKEN,
dataset: process.env.AXIOM_DATASET
}
```
#### Inherited from
`AxiomConfigBase.eval`