Skip to content
/ chatbot-ws Public template
generated from QubitPi/fast-ws

Enterprise proxy webservice against various LLM chatbot frameworks, such as OpenAI

License

Notifications You must be signed in to change notification settings

QubitPi/chatbot-ws

Repository files navigation

ChatbotWS

Java Version Badge GitHub Workflow Status Apache License Badge

ChatbotWS is a JSR 370 webservice template that lets us spin up Java webservice quickly through GitHub templates. Whether we want to create a chatbot that leverages popular APIs such as ChatGPT or connect to our own custom service, this template can do it all! Explore chatbot.qubitpi.org to view all of its available features, how to use them, examples and more!

✨ Features

  • Connect to any API
  • Data storage
  • Out-of-the-box healthcheck endpoint
  • Docusaurus-based documentation site freely hosted on GitHub Pages
  • Dockerized webservice
  • ELK application monitoring
  • Flexible webservice configuration

🚀 Quick Start

Spinning Up a Container

Please make sure Docker is installed (Installing Docker), then execute this on-click commands:

Important

Please replace the OPENAI_API_KEY below with the actual key which can be obtained here

export OPENAI_API_KEY=...
docker run  -it -p 8080:8080 -e OPENAI_API_KEY=$OPENAI_API_KEY jack20191124/chatbot-ws

That's it. A healthcheck endpoint can be pinned with

curl -v localhost:8080/v1/healthcheck

which would gave

$ curl -v localhost:8080/v1/healthcheck
*   Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /v1/healthcheck HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.85.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Length: 0
< Server: Jetty(11.0.15)
<
* Connection #0 to host localhost left intact

Sending the First Chat Request

curl --location 'http://localhost:8080/v1/openai/chat' --header 'Content-Type: application/json' --data '{
    "message": "Hello"
}' -v

Developer can now start adding business values without repeating the time-consuming scaffolding works. To proceed from here, including getting and developing the webservice source code, please refer to the documentation for details.

License

The use and distribution terms for chatbot-ws are covered by the Apache License, Version 2.0.

About

Enterprise proxy webservice against various LLM chatbot frameworks, such as OpenAI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published