1.0.14 • Published 10 months ago

qcobjects-openai-api v1.0.14

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
-
Last release
10 months ago

QCObjects OpenAI API

Install

npm i qcobjects-openai-api

Setup in your config.json

"backend":{
    "routes":[
        {
          "name":"QCObjects Open AI API Proxy",
          "description":"This endpoint returns same response like if you were calling to OpenAI API",
          "path": "^/api/openai$",
          "microservice":"qcobjects-openai-api",
          "headers": {
            "content-type": "text/html; charset=utf-8"
          },
          "responseHeaders":{
          },
          "cors":{
            "allow_origins":"*"
          }
        }
    ]
}

The way of using it

import {chatbotComponent} from "qcobjects-openai-api/components";

document.addEventListener("DOMContentLoaded", ()=>{
    document.body.append(chatbotComponent.body);
});

# Visit

Visit https://localhost:port/api/openai

Create your own microservice

To make your own microservice, you can generate it with QCObjects CLI using this package as template:

qcobjects create --custom=qcobjects-openai-api myown-handler-microservice
1.0.14

10 months ago

1.0.13

10 months ago

1.0.12

10 months ago

1.0.11

10 months ago

1.0.10

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago