Files
Sybil-2/server/src/search/exa.ts

15 lines
279 B
TypeScript
Raw Normal View History

2026-02-13 23:49:55 -08:00
import { Exa } from "exa-js";
import { env } from "../env.js";
let client: Exa | null = null;
export function exaClient() {
if (!env.EXA_API_KEY) {
throw new Error("EXA_API_KEY not set");
}
if (!client) {
client = new Exa(env.EXA_API_KEY);
}
return client;
}