PAAIG Secure Chat is a conversational AI chatbot
Project description
PAIG Securechat
Secure Chat is a conversational AI chatbot . Secure chat allows users to create conversations with an AI chatbot which can optionally be governed by PAIG. Secure chat library provides an easy to use, plugable platform which will allow developers/users to have open sourced chatbot python library.
Contents
Installation
PAIG Secure chat is a python library which can be installed using pip.
pip install paig_securechat
Usage
PAIG Secure chat can be used in following ways: Before starting the securechat , please download your PAIG Shield Config file.Then run the following command to copy file to desired destination.
mkdir -p custom-configs
cp <path to privacera-shield-app-name-config.json> custom-configs/privacera-shield-config.json
- Run as a service: You can simply run the secure chat as a service by running following command:
paig_securechat run
To get the help for the command and see all available [OPTIONS], you can run the following command:
paig_securechat --help
Example:
paig_securechat run --port 2324 --host 0.0.0.0 --openai_api_key <API_KEY>
- Run as a library: You can run PAIG Secure chat in background by importing the library in your python code. Please run help command to see all available options you can pass while calling launch_app method.
from paig_securechat import launcher
# Start the PAIG Secure Chatbot
session = launcher.launch_app()
# To start without PAIG Shield
# session = launcher.launch_app(disable_paig_shield_plugin=True)
# To get active sessions
active_session = launcher.get_active_session()
print(active_session)
# To view the chatbot in the browser/Iframe
print(active_session.url)
# To view the chatbot in the Iframe
active_session.view()
# To stop the chatbot
launcher.close_app()
[!NOTE] We recommend to use PAIG Shield config for governance of the chatbot.You can opt for insecure mode by providing the
--disable_paig_shield_plugin
flag while running the chatbot. You can pass this option in launch_app method as well.
Configuration
PAIG Secure chat provides overlay configuration. You can provide the custom configuration in the following ways:
- Create a new directory in the present working directory of the project with the name
custom-configs
. - Create a new custom configuration file named
standalone_config.yaml
in thecustom-configs
folder which is provided to the application. - In custom configuration file , user should provide new configuration key-values or override the existing configuration.
- User can configure
response_if_no_docs_found
to provide a custom response when vector DB return no docs, If user want response from AI Model then setresponse_if_no_docs_found
tonull
Example:custom-configs/standalone_config.yaml
#MODELS CONFIG
AI_applications:
file_path: "configs/AI_applications.json"
default_implementation_class: "services.OpenAI_Application.OpenAIClient.OpenAIClient"
response_if_no_docs_found: "I cannot answer this question as there was no context provided"
sales_model:
conversation_history_k: 5
paig_shield_config_file: "custom-configs/privacera-shield-config.json"
disable_conversation_chain: false
vectordb:
index_path: "securechat/sales/index"
data_path: "securechat/sales/data"
vector_type: "chroma"
Configure PAIG Shield Config
PAIG SecureChat provides an option to configure the PAIG Shield Config. You can refer to standalone_config.yaml to see location of the shield config file. All you need to do is to copy PAIG Shield Config file to the location mentioned in the standalone_config.yaml file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file paig_securechat-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: paig_securechat-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57114cd1ee03339db98d859579cf7b4b4f67d9261329e6af76e5c47903dbb11d |
|
MD5 | 3632e02405448481b4545c1c85bd73c2 |
|
BLAKE2b-256 | c73ec2298cbcb4f67fe424f81b60e13516f0e50a7d5752c2c33e0ab332890729 |