@ninebit/ciq
v1.0.6
Published
JavaScript SDK for NineBit CIQ
Downloads
10
Maintainers
Readme
Node TypeScript SDK for RAG (Retrieval Augmented Generation)
🔗 @ninebit/ciq
Official Node.js SDK for interacting with NineBit CIQ — a Retrieval-Augmented Generation (RAG) workflow orchestration platform for secure, private, rapid prototyping of AI/ML ideas using enterprise data and open-source models.
Join the community:
🚀 Features
- Retrieval-Augmented Generation (RAG) Perform semantic search and intelligent query answering using hybrid retrieval techniques.
- Flexible Query Interface Send queries with configurable similarity thresholds and top_k result tuning.
- Callback Support for Asynchronous Workflows Pass in callbacks to handle results or errors once workflows complete — ideal for event-driven applications.
- Workflow Polling with Timeout Control Monitor long-running workflows with built-in polling, status checking, and customizable timeouts.
- Simple, Extensible API Clean, Pythonic interfaces with support for both synchronous returns and optional callbacks.
- Error-Handled Execution Flow Graceful handling of task failures, timeouts, and unexpected states with descriptive exceptions.
- Logging Support Integrated logging for easy debugging and transparency during polling or querying.
📦 Installation
npm install @ninebit/ciq🔧 Quickstart (Node.js)
// Use import for ESM
import { CIQClient } from '@ninebit/ciq';
// Use require() for CommonJS
const { CIQClient } = require('@ninebit/ciq');
const apiKey = process.env.API_KEY || '';
const client = new CIQClient(apiKey);
async function runExample() {
try {
await client.ingestFile('files/eco101.pdf');
const query = 'Your Query String?';
const response = await client.ragQuery(query);
console.log('Query response is ', response);
} catch (error) {
console.error('Error in CIQ:', error);
}
}
runExample();🔐 Authentication - You’ll Need an API Key
If you’re using the Freemium CIQ setup, you’ll just need to register at our web app and grab your API key. It’s quick, and no credit card is required.
You can sign up here NineBit CIQ
🧪 Running Tests
npm run test
npm run test:coverage🛠 Developer Setup
If you're contributing to this SDK, see DEVELOPER.md for full setup, linting, formatting, and test instructions.
📄 API Reference
| Method | Description |
| ------------------------ | ------------------------------------------------------------------------------- |
| ingestFile(file_path) | Reads and uploads a PDF or DOCX file to the backend for processing. |
| ragQuery(query_string) | Performs a Retrieval-Augmented Generation (RAG) query using the provided input. |
⚙️ Configuration
| Option | Type | Required | Description |
| --------- | ------ | -------- | ----------------------------------- |
| apiKey | string | ✅ | Your CIQ API Key |
| baseUrl | string | ❌ | Optional (default: CIQ backend URL) |
📄 License
MIT
🤝 Contributing
Pull requests are welcome! Please check DEVELOPER.md and ensure:
- Tests pass
- Lint/format clean
- Coverage is not broken
📬 Questions?
Email us at [email protected] or visit NineBit Computing
© NineBit Computing, 2025
