unichat-ts
v2.4.3
Published
Universal API chat Node.js client for OpenAI, MistralAI, Anthropic, xAI, Google AI, or any OpenAI SDK LLM provider.
Readme
unichat
Universal API chat Node.js client for OpenAI, MistralAI, Anthropic, xAI, Google AI, or any OpenAI SDK LLM provider.
Build sequence:
rm -rf distnpx tscnpm publishUsage:
- Install the npm package:
npm install unichat-ts- Add the class 'UnifiedChatApi' from module 'unichat' to your application:
For OpenAI-compatible providers, pass the provider endpoint as baseURL when constructing UnifiedChatApi.
- [optional] Import MODELS_LIST as well for additional validation
Functionality testing:
Try the eclosed in the source code 'test.js' file:
npm test