Skip to content

env changes for VITE #690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ DIFFBOT_API_KEY="your-diffbot-key"

if you only want OpenAI:
```env
LLM_MODELS="diffbot,openai-gpt-3.5,openai-gpt-4o"
VITE_LLM_MODELS="diffbot,openai-gpt-3.5,openai-gpt-4o"
OPENAI_API_KEY="your-openai-key"
```

if you only want Diffbot:
```env
LLM_MODELS="diffbot"
VITE_LLM_MODELS="diffbot"
DIFFBOT_API_KEY="your-diffbot-key"
```

Expand All @@ -59,13 +59,13 @@ docker-compose up --build

By default, the input sources will be: Local files, Youtube, Wikipedia ,AWS S3 and Webpages. As this default config is applied:
```env
REACT_APP_SOURCES="local,youtube,wiki,s3,web"
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,web"
```

If however you want the Google GCS integration, add `gcs` and your Google client ID:
```env
REACT_APP_SOURCES="local,youtube,wiki,s3,gcs,web"
GOOGLE_CLIENT_ID="xxxx"
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,gcs,web"
VITE_GOOGLE_CLIENT_ID="xxxx"
```

You can of course combine all (local, youtube, wikipedia, s3 and gcs) or remove any you don't want/need.
Expand All @@ -75,12 +75,12 @@ You can of course combine all (local, youtube, wikipedia, s3 and gcs) or remove
By default,all of the chat modes will be available: vector, graph+vector and graph.
If none of the mode is mentioned in the chat modes variable all modes will be available:
```env
CHAT_MODES=""
VITE_CHAT_MODES=""
```

If however you want to specify the only vector mode or only graph mode you can do that by specifying the mode in the env:
```env
CHAT_MODES="vector,graph+vector"
VITE_CHAT_MODES="vector,graph+vector"
```

#### Running Backend and Frontend separately (dev environment)
Expand Down Expand Up @@ -143,15 +143,15 @@ Allow unauthenticated request : Yes
| LANGCHAIN_PROJECT | Optional | | Project for Langchain |
| LANGCHAIN_TRACING_V2 | Optional | true | Flag to enable Langchain tracing |
| LANGCHAIN_ENDPOINT | Optional | https://api.smith.langchain.com | Endpoint for Langchain API |
| BACKEND_API_URL | Optional | http://localhost:8000 | URL for backend API |
| BLOOM_URL | Optional | https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true | URL for Bloom visualization |
| REACT_APP_SOURCES | Mandatory | local,youtube,wiki,s3 | List of input sources that will be available |
| LLM_MODELS | Mandatory | diffbot,openai-gpt-3.5,openai-gpt-4o | Models available for selection on the frontend, used for entities extraction and Q&A
| CHAT_MODES | Mandatory | vector,graph+vector,graph,hybrid | Chat modes available for Q&A
| ENV | Mandatory | DEV or PROD | Environment variable for the app |
| TIME_PER_CHUNK | Optional | 4 | Time per chunk for processing |
| CHUNK_SIZE | Optional | 5242880 | Size of each chunk of file for upload |
| GOOGLE_CLIENT_ID | Optional | | Client ID for Google authentication |
| VITE_BACKEND_API_URL | Optional | http://localhost:8000 | URL for backend API |
| VITE_BLOOM_URL | Optional | https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true | URL for Bloom visualization |
| VITE_REACT_APP_SOURCES | Mandatory | local,youtube,wiki,s3 | List of input sources that will be available |
| VITE_LLM_MODELS | Mandatory | diffbot,openai-gpt-3.5,openai-gpt-4o | Models available for selection on the frontend, used for entities extraction and Q&A
| VITE_CHAT_MODES | Mandatory | vector,graph+vector,graph,hybrid | Chat modes available for Q&A
| VITE_ENV | Mandatory | DEV or PROD | Environment variable for the app |
| VITE_TIME_PER_CHUNK | Optional | 4 | Time per chunk for processing |
| VITE_CHUNK_SIZE | Optional | 5242880 | Size of each chunk of file for upload |
| VITE_GOOGLE_CLIENT_ID | Optional | | Client ID for Google authentication |
| GCS_FILE_CACHE | Optional | False | If set to True, will save the files to process into GCS. If set to False, will save the files locally |
| ENTITY_EMBEDDING | Optional | False | If set to True, It will add embeddings for each entity in database |
| LLM_MODEL_CONFIG_ollama_<model_name> | Optional | | Set ollama config as - model_name,model_local_url for local deployments |
Expand Down
21 changes: 11 additions & 10 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ GCS_FILE_CACHE = False
ENTITY_EMBEDDING=True

# Optional Frontend
BACKEND_API_URL="http://localhost:8000"
BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
REACT_APP_SOURCES="local,youtube,wiki,s3,web"
LLM_MODELS="diffbot,openai-gpt-3.5,openai-gpt-4o" # ",ollama_llama3"
ENV="DEV"
TIME_PER_CHUNK=4
TIME_PER_PAGE=50
CHUNK_SIZE=5242880
GOOGLE_CLIENT_ID=""
CHAT_MODES=""
VITE_BACKEND_API_URL="http://localhost:8000"
VITE_BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,web"
VITE_LLM_MODELS="diffbot,openai-gpt-3.5,openai-gpt-4o" # ",ollama_llama3"
VITE_ENV="DEV"
VITE_TIME_PER_CHUNK=4
VITE_TIME_PER_PAGE=50
VITE_CHUNK_SIZE=5242880
VITE_GOOGLE_CLIENT_ID=""
VITE_CHAT_MODES=""
VITE_BATCH_SIZE=2
24 changes: 12 additions & 12 deletions frontend/example.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
BACKEND_API_URL="http://localhost:8000"
BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
REACT_APP_SOURCES="local,youtube,wiki,s3,web"
LLM_MODELS="diffbot,openai-gpt-3.5,openai-gpt-4o"
ENV="DEV"
TIME_PER_CHUNK=4
TIME_PER_PAGE=50
CHUNK_SIZE=5242880
LARGE_FILE_SIZE=5242880
GOOGLE_CLIENT_ID=""
CHAT_MODES=""
BATCH_SIZE=2
VITE_BACKEND_API_URL="http://localhost:8000"
VITE_BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,web"
VITE_LLM_MODELS="diffbot,openai-gpt-3.5,openai-gpt-4o"
VITE_ENV="DEV"
VITE_TIME_PER_CHUNK=4
VITE_TIME_PER_PAGE=50
VITE_CHUNK_SIZE=5242880
VITE_LARGE_FILE_SIZE=5242880
VITE_GOOGLE_CLIENT_ID=""
VITE_CHAT_MODES=""
VITE_BATCH_SIZE=2
25 changes: 9 additions & 16 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,6 @@
"@floating-ui/core" "^1.6.0"
"@floating-ui/utils" "^0.2.7"


"@floating-ui/react-dom@2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.0.1.tgz#7972a4fc488a8c746cded3cfe603b6057c308a91"
Expand Down Expand Up @@ -586,7 +585,6 @@
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.7.tgz#d0ece53ce99ab5a8e37ebdfe5e32452a2bfc073e"
integrity sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==


"@formatjs/ecma402-abstract@2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-2.0.0.tgz#39197ab90b1c78b7342b129a56a7acdb8f512e17"
Expand Down Expand Up @@ -894,25 +892,23 @@
"@types/chroma-js" "2.1.4"
chroma-js "2.4.2"

"@neo4j-ndl/base@^2.12.10", "@neo4j-ndl/base@^2.12.7":
version "2.12.10"
resolved "https://registry.yarnpkg.com/@neo4j-ndl/base/-/base-2.12.10.tgz#50c96e34593e2b3ee157f89a1dbcdceceae5dd89"
integrity sha512-RPwHeUki7JBUTfORA/ssrqOZb1LcMbfZyWrKPYKi8QTrEzypEUONwuX8hef6sg4E+vp+4WI/dAEsjnTezCpB8A==

"@neo4j-ndl/base@^2.11.6":
version "2.12.7"
resolved "https://registry.yarnpkg.com/@neo4j-ndl/base/-/base-2.12.7.tgz#07e68c6dfe684e91b6cf1ae87e23ef3fc77abae9"
integrity sha512-BtR7+MfqlJt+yC6h7Dtj/BAme1D3qDnQTbb2SlwSnCFFMuMCFwXmq0MHFFI7AbVjgT3v37NXx3ek9r7HhfyoNQ==

"@neo4j-ndl/react@2.15.10":
version "2.15.10"
resolved "https://registry.yarnpkg.com/@neo4j-ndl/react/-/react-2.15.10.tgz#c109633adc3fd08fb510b3b57e70a1ed5216bf4f"
integrity sha512-U3pFJS23riItlklCgVZs40xxVAypVAM3u+rbIItOJYDEl1/yxtoYtjuFSyyegke6Hw6EBw/gJ73aBMel7hEWoQ==

"@neo4j-ndl/react@^2.16.9":
version "2.16.14"
resolved "https://registry.yarnpkg.com/@neo4j-ndl/react/-/react-2.16.14.tgz#384ba28e2fe80b02201c6be4bf8b5090ed8392fa"
integrity sha512-Whhj8kN0l0ppoz2EJRMUQE8OaJUK5/SsMpRLCETD907Ikwdeo8W97Jm2m5pNsWw0XiRfCVa/t4kX7oHQkZI56w==
dependencies:
"@dnd-kit/core" "6.1.0"
"@dnd-kit/sortable" "8.0.0"
"@floating-ui/react" "0.25.1"
"@floating-ui/react-dom" "2.0.1"
"@heroicons/react" "2.0.18"
"@neo4j-cypher/react-codemirror" "^1.0.1"
"@neo4j-ndl/base" "^2.12.7"
"@neo4j-ndl/base" "^2.12.10"
"@table-nav/core" "0.0.7"
"@table-nav/react" "0.0.7"
"@tanstack/react-table" "8.11.8"
Expand Down Expand Up @@ -1866,7 +1862,6 @@
dependencies:
"@react-types/shared" "^3.24.1"


"@react-types/combobox@^3.12.1":
version "3.12.1"
resolved "https://registry.yarnpkg.com/@react-types/combobox/-/combobox-3.12.1.tgz#ab015d31c160aa0a21d696887ce81467c5996602"
Expand Down Expand Up @@ -2672,7 +2667,6 @@ caniuse-lite@^1.0.30001646:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz#52de59529e8b02b1aedcaaf5c05d9e23c0c28138"
integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==


ccount@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5"
Expand Down Expand Up @@ -6136,7 +6130,6 @@ tailwindcss@^3.4.1:
version "3.4.9"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.9.tgz#9e04cddce1924d530df62af37d3520f0e2a9d85e"
integrity sha512-1SEOvRr6sSdV5IDf9iC+NU4dhwdqzF4zKKq3sAbasUWHEM6lsMhX+eNN5gkPx1BvLFEnZQEUFbXnGj8Qlp83Pg==

dependencies:
"@alloc/quick-lru" "^5.2.0"
arg "^5.0.2"
Expand Down