Skip to content

Commit

Permalink
Test workflow for running Vectara in a Docker container.
Browse files Browse the repository at this point in the history
  • Loading branch information
shefulloflight committed Dec 8, 2023
1 parent 4087c2c commit b630c1c
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# CORPUS AND API KEY
REACT_APP_corpus_id=2
REACT_APP_customer_id=4077139778
REACT_APP_api_key=zwt_8wQ3Qo_TUbiG-zEC5vkNmV5pH62rFQEryWoNOw
REACT_APP_endpoint=api.vectara.io

# SOURCE FILTERS (if >1 CORPUS)
#REACT_APP_enable_source_filters=True
#REACT_APP_all_sources=True
#REACT_APP_sources="foo,bar,baz"

# SEARCH LOGO
#REACT_APP_search_logo_link="https://docs.qumulo.com/"
#REACT_APP_search_logo_src="images/qumulo-logo.png"
#REACT_APP_search_logo_alt="Qumulo Logo"
#REACT_APP_search_logo_height="50"

# UI Elements
REACT_APP_enable_app_header=False
REACT_APP_enable_app_foter=False

# BASIC SEARCH SETTINGS
REACT_APP_app_title=Qumulo Search
#REACT_APP_search_title=Qumulo Documentation Portal
REACT_APP_search_description=Ask a question about the Qumulo ecosystem!
REACT_APP_questions=["What is a Qumulo node?","What is a Qumulo cluster?","How does NFSv4.1 work with Kerberos in Qumulo Core?","How does the S3 API work in Qumulo Core?","How does Qumulo Core integrate with Varonis?"]
REACT_APP_enable_source_filters=False
REACT_APP_summary_default_language=eng
REACT_APP_summary_num_sentences=3
REACT_APP_summary_num_results=7

# SEARCH RESULT TUNING
REACT_APP_ux="summary"
REACT_APP_summary_default_language="eng"
#REACT_APP_summary_num_sentences=3
#REACT_APP_summary_num_results=10
#REACT_APP_summary_prompt_name=vectara-summary-ext-v.1.2.0
REACT_APP_summary_enable_hem=True

# HYBRID SEARCH
#REACT_APP_hybrid_search_num_words=2
#REACT_APP_hybrid_search_lambda_long=0.0
#REACT_APP_hybrid_search_lambda_short=0.1

# RERANKING
#REACT_APP_rerank=True
#REACT_APP_rerank_num_results=50

# MAXIMUM MARGINAL RELEVANCE
#REACT_APP_mmr=True
#REACT_APP_mmr_diversity_bias=0.3
#REACT_APP_mmr_num_results=50

# ANALYTICS
#REACT_APP_google_analytics_tracking_code: "G-81J7N4LMSE"
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ jobs:
- name: Build feature branch
# `prod` is the name of the output directory
run: JEKYLL_ENV=preview LC_ALL=C.UTF-8 bundle exec jekyll build -d test
# Append API Key to .env file
- name: Append API Key to .env
run: echo "API_KEY=${{ secrets.API_KEY }}" >> .env
# Run the vectara/vectara-answer Docker container
- name: Run Vectara Answer Docker container
run: |
docker run -v $PWD/queries.json:/build/queries.json \
-v $PWD/.env:/.env \
vectara/vectara-answer \
/bin/bash -c "node server/index.js"
4 changes: 4 additions & 0 deletions docker/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ARG API_KEY

ENV API_KEY=${API_KEY}

FROM ruby:2.7.6

WORKDIR /tmp
Expand Down
9 changes: 9 additions & 0 deletions queries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"questions": [
"What is a Qumulo node?",
"What is a Qumulo cluster?",
"How does NFSv4.1 work with Kerberos in Qumulo Core?",
"How does the S3 API work in Qumulo Core?",
"How does Qumulo Core integrate with Varonis?"
]
}

0 comments on commit b630c1c

Please sign in to comment.