Skip to content

Commit

Permalink
Merge branch 'main' into STAGING
Browse files Browse the repository at this point in the history
  • Loading branch information
prakriti-solankey authored Dec 19, 2024
2 parents 102f01d + 4f743dd commit beddf81
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 42 deletions.
23 changes: 3 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,14 @@ If you are using Neo4j Desktop, you will not be able to use the docker-compose b
### Local deployment
#### Running through docker-compose
By default only OpenAI and Diffbot are enabled since Gemini requires extra GCP configurations.
Accoroding to enviornment we are configuring the models which is indicated by VITE_LLM_MODELS_PROD variable we can configure model based on our need.
According to enviornment we are configuring the models which is indicated by VITE_LLM_MODELS_PROD variable we can configure model based on our need.
EX:
```env
VITE_LLM_MODELS_PROD="openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash"
```
According to the environment, we are configuring the models which indicated by VITE_LLM_MODELS_PROD variable we can configure models based on our needs.
EX:
```env
VITE_LLM_MODELS_PROD="openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash"
```

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

You can then run Docker Compose to build and start all components:
```bash
docker-compose up --build
Expand All @@ -79,7 +62,7 @@ You can of course combine all (local, youtube, wikipedia, s3 and gcs) or remove
### Chat Modes

By default,all of the chat modes will be available: vector, graph_vector, graph, fulltext, graph_vector_fulltext , entity_vector and global_vector.
By default,all of the chat modes will be available: vector, graph_vector, graph, fulltext, graph_vector_fulltext , entity_vector and global_vector.

If none of the mode is mentioned in the chat modes variable all modes will be available:
```env
VITE_CHAT_MODES=""
Expand Down Expand Up @@ -123,7 +106,7 @@ Alternatively, you can run the backend and frontend separately:
To deploy the app and packages on Google Cloud Platform, run the following command on google cloud run:
```bash
# Frontend deploy
gcloud run deploy dev-frontend --set-env-vars "VITE_BACKEND_API_URL=" --set-env-vars "VITE_FRONTEND_HOSTNAME=hostname.us-central1.run.app" --set-env-vars "VITE_SEGMENT_API_URL=https://cdn.segment.com/v1/projects/4SGwdwzuDm5WkFvQtz7D6ATQlo14yjmW/settings"
gcloud run deploy dev-frontend
source location current directory > Frontend
region : 32 [us-central 1]
Allow unauthenticated request : Yes
Expand Down
2 changes: 1 addition & 1 deletion backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ graphdatascience==1.12
Secweb==1.11.0
ragas==0.2.6
rouge_score==0.1.2
langchain-neo4j==0.1.1
langchain-neo4j==0.1.1
2 changes: 1 addition & 1 deletion backend/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from Secweb.XFrameOptions import XFrame
from fastapi.middleware.gzip import GZipMiddleware
from src.ragas_eval import *
from starlette.types import ASGIApp, Receive, Scope, Send
from starlette.types import ASGIApp, Message, Receive, Scope, Send
from langchain_neo4j import Neo4jGraph

logger = CustomLogger()
Expand Down
2 changes: 1 addition & 1 deletion backend/src/graphDB_dataAccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,5 +520,5 @@ def update_node_relationship_count(self,document_name):
"nodeCount" : nodeCount,
"relationshipCount" : relationshipCount
}

return response
1 change: 0 additions & 1 deletion frontend/src/components/Layout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ const PageLayout: React.FC = () => {
}
};
// To update credentials if environment values differ

const updateSessionIfNeeded = (envCredentials: any, storedSession: string) => {
try {
const storedCredentials = JSON.parse(storedSession);
Expand Down
1 change: 0 additions & 1 deletion frontend/src/context/UserCredentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const UserCredentialsWrapper: FunctionComponent<Props> = (props) => {
const [errorMessage, setErrorMessage] = useState<string>('');
const [showDisconnectButton, setShowDisconnectButton] = useState<boolean>(false);
const [isGCSActive, setIsGCSActive] = useState<boolean>(false);

const value = {
userCredentials,
setUserCredentials,
Expand Down
Loading

0 comments on commit beddf81

Please sign in to comment.