@plasma-platform/service-ai
v0.0.5
Published
Ai Service API
Downloads
21
Readme
Full documentation
install:npm i @plasma-platform/service-apv -S
Short documentation
Table of Contents
AiService
messages
object with class service messages
Type: object
createAI
AiService - Create open AI
Examples
(async () => {
const service = new AiService(url);
const request = await service.createAI({ api_key: 'sk-123' });
})();
Returns Promise<any>
updateAI
AiService - Update open AI
Examples
(async () => {
const service = new AiService(url);
const request = await service.updateAI({ api_key: 'sk-123' });
})();
Returns Promise<any>
deleteAI
AiService - Delete open AI
Examples
(async () => {
const service = new AiService(url);
const request = await service.deleteAI();
})();
Returns Promise<any>
getAI
AiService - Get open AI
Examples
(async () => {
const service = new AiService(url);
const request = await service.getAI();
})();
Returns Promise<any>
getModels
AiService - List and describe the various models available in the API
Examples
(async () => {
const service = new AiService(url);
const request = await service.getModels();
})();
Returns Promise<any>
postChatCompletions
AiService - Create chat message completion
Examples
(async () => {
const service = new AiService(url);
const request = await service.postChatCompletions({ api_key: 'sk-123' });
})();
Returns Promise<any>