@ramen-ai/sdk
v0.4.0
Published
The official TypeScript/Node.js SDK for the ramen ai PaaS and Expert Runtime.
Downloads
423
Maintainers
Readme
@ramen-ai/sdk
The official TypeScript/Node.js SDK for the ramen ai platform — PaaS guardrail evaluation and Expert Runtime chat.
Install
npm install @ramen-ai/sdkQuick Start
import { RamenClient } from '@ramen-ai/sdk';
const client = new RamenClient({ apiKey: 'ramen_ak_...' });
// Evaluate content against guardrail policies
const evaluation = await client.paas.evaluate({
policy_ids: ['your-policy-id'],
input: 'Content to evaluate',
});
console.log(evaluation.allowed); // true | false
console.log(evaluation.total_violations); // GuardrailViolation[]
// Chat with a deployed Expert
const chat = await client.experts.chat('your-expert-id', 'Hello!');
console.log(chat.response);API Reference
RamenClient(config)
| Option | Type | Required | Description |
|-----------|----------|----------|--------------------------------------------------|
| apiKey | string | Yes | Your ramen ai API key (ramen_ak_...) |
| baseUrl | string | No | Override the default https://api.ramenai.dev |
client.paas.evaluate(request)
Evaluate input against one or more guardrail policies in parallel.
client.paas.auditAsync(request)
Submit an asynchronous compliance audit. Results are delivered to your webhook URL.
client.experts.chat(expertId, message, history?)
Send a message to a deployed Expert and receive a response.
License
MIT
