Docker image for https://github.com/vectara/vectara-answer.
10K+
vectara-answer is an open source React project that provides a configurable conversational search user interface. You can deploy it to end users so they can ask questions of your data and get back accurate, dependable answers, or refer to the source code when building your own conversational search applications.
The corresponding code is available in Github.
For details, see: https://github.com/vectara/vectara-answer#deployment
You need three configuration files to use vectara-answer:
The config.yaml file defines user interface parameters like title text, logo img file if exists, and others (see here for more details)
For example:
$ cat config.yaml
corpus_id: "151,152,153,154,155"
customer_id: 1526022105
app_title: "AskNews"
app_header_learn_more_link: "https://vectara.com/developers/sample-apps/"
search_description: "Sample news aggregator built using Vectara"
search_logo_src: "images/asknews_logo.png" ## could be URL
search_logo_alt: "AskNews logo"
search_logo_height: "20"
enable_source_filters: True
sources: "BBC,NPR,FOX,CNBC,CNN"
The queries.json file defines curated questions to suggest on the UI. (see here for more details).
For example:
$ cat queries.json
{
"questions": [
"Should AI be regulated?",
"Will AI replace Hollywood screenwriters?",
"Should athletes be allowed to protest?",
"what happened to Harry and Megan in NYC?"
]
}
The secrets.toml file provides credentials to query the Vectara corpus.
$ cat secrets.toml
[news]
api_key="zwt_YZD..."
[finance]
api_key="zwt_YOQ..."
To run we will use the docker image, and follow these steps:
.env file that combines the input from the config.yaml and secrets.toml into a single file with only the needed information. You can use the prepare_config.py to perform this task for you, resulting in a local .env file as follows:# config/asknews/config.yaml is the config file, and "news" is the profile name in secrets.toml
python3 prepare_config.py config/asknews news.
.env and queries.json files (that are in the local folder) into the container at /usr/src/app/loaded_config:docker run --platform=linux/amd64 -d -v $(PWD)/queries.json:/usr/src/app/build/queries.json \
-p 127.0.0.1:80:3000/tcp \
--env-file .env \
--name vanswer vectara/vectara-answer
Content type
Image
Digest
sha256:cc9a5aecc…
Size
73.4 MB
Last updated
over 1 year ago
docker pull vectara/vectara-answer