JavaScript SDK API

TaxiaClient methods, options, streaming, batch dedupe, and error handling.

TaxiaClient

import { TaxiaClient } from '@xaikorea0/js-client';

const client = new TaxiaClient({
  apiKey: 'YOUR_API_KEY',
  cacheEnabled: true,
  timeoutMs: 10000,
  retry: { retries: 2, baseDelayMs: 500 },
});

Methods

QueryResponse

Options

Error handling

import { HttpError } from '@xaikorea0/js-client/utils/http';
try {
  await client.query('...');
} catch (err) {
  if (err instanceof HttpError) {
    console.error('status', err.status);
  }
}

Streaming (SSE)

Batch deduplication

Duplicate questions in the same batch execute once and share the result.

Utilities

HuggingFaceDataLoader

import { HuggingFaceDataLoader } from '@xaikorea0/js-client/utils/hf-loader';
const loader = new HuggingFaceDataLoader();
const data = await loader.downloadDataNode();

Links

← Back to Docs Home