xima-ai
v3.0.2
Published
Node client library for the XimaAI API
Readme
Control Panel for AI Apps
npm install xima-aiFeatures
The XimaAI SDK is built on top of the OpenAI SDK, allowing you to seamlessly integrate XimaAI's advanced features while retaining full compatibility with OpenAI methods. With XimaAI, you can enhance your interactions with OpenAI or any other OpenAI-like provider by leveraging robust monitoring, reliability, prompt management, and more features - without modifying much of your existing code.
AI Gateway
Observability
Usage
Prerequisites
- Sign up on XimaAI and grab your XimaAI API Key
- Add your OpenAI key to XimaAI's Virtual Keys page and keep it handy
# Installing the SDK
$ npm install xima-ai
$ export XIMAAI_API_KEY="XIMAAI_API_KEY"Making a Request to OpenAI
- XimaAI fully adheres to the OpenAI SDK signature. You can instantly switch to XimaAI and start using our production features right out of the box.
- Just replace
import OpenAI from 'openai'withimport XimaAI from 'xima-ai':
import XimaAI from 'xima-ai';
const ximaai = new XimaAI({
virtualKey: "VIRTUAL_KEY"
})
async function main() {
const chatCompletion = await ximaai.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gpt-4',
});
console.log(chatCompletion.choices);
};
main();Check out XimaAI docs for the full list of supported providers
Contributing
Get started by checking out Github issues. Email us at [email protected] or just ping on Discord to chat.
