Skip to content

Commit

Permalink
Jfrost readme Updates plus Serdar's changes (#6)
Browse files Browse the repository at this point in the history
* Resolved merge conflict in file

* remove secret key

* Integrate azure_ai and age enablement

* Add new related data and fix issues

* Add .env.sample file and make the options functional

* Fix Azure ML usage

* Fix venv related issue while running azd up

* First commit of combined branch of updated Readme.md and Serdar's Changes branch together

---------

Co-authored-by: Serdar Mumcu <[email protected]>
  • Loading branch information
jjfrost and Serdar Mumcu authored Nov 18, 2024
1 parent 284c871 commit e609329
Show file tree
Hide file tree
Showing 129 changed files with 247,473 additions and 294 deletions.
57 changes: 57 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.0/containers/python-3
{
"name": "legal-research-copilot-postgresql",
"dockerComposeFile": "../docker-compose.yaml",
"service": "app",
"workspaceFolder": "/workspace",
"forwardPorts": [5432],
"portsAttributes": {
"5432": {"label": "PostgreSQL port", "onAutoForward": "silent"},
"8000": {"label": "Backend port", "onAutoForward": "openBrowser"},
"5173": {"label": "Frontend port", "onAutoForward": "openBrowser"}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "18",
"nodeGypDependencies": false
},
"ghcr.io/azure/azure-dev/azd:latest": {
"version": "1.10.1"
},
"ghcr.io/devcontainers/features/azure-cli": {}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff",
"mtxr.sqltools",
"mtxr.sqltools-driver-pg",
"ms-vscode.vscode-node-azure-pack",
"esbenp.prettier-vscode"
],
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/usr/local/bin/python",
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": false,
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
}
},
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip install -r requirements-dev.txt && pip install -e src/backend",
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
40 changes: 40 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Database Configuration
POSTGRES_HOST=localhost
POSTGRES_USERNAME=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DATABASE=postgres
POSTGRES_SSL=disable

# Workspace Path
WORKSPACE=/workspace

# PostgreSQL User Configuration
POSTGRES_USER_ID=1000
POSTGRES_USER_NAME=postgres
POSTGRES_USER_SHELL=/bin/bash

# PostgreSQL and pgenv Versions
PGENV_VERSION=1.3.7
PG_VERSION=16.4

# OpenAI Configuration
OPENAI_CHAT_HOST=azure
OPENAI_EMBED_HOST=azure

# Azure OpenAI Configuration
AZURE_OPENAI_ENDPOINT=https://serdar-azure-open-ai.openai.azure.com
AZURE_OPENAI_VERSION=2024-08-01-preview
AZURE_OPENAI_CHAT_DEPLOYMENT=gpt-4o
AZURE_OPENAI_CHAT_MODEL=gpt-4o
AZURE_OPENAI_EMBED_DEPLOYMENT=text-embedding-3-small
AZURE_OPENAI_EMBED_MODEL=text-embedding-3-small
AZURE_OPENAI_EMBED_DIMENSIONS=1536
AZURE_OPENAI_EMBEDDING_COLUMN=description_vector
AZURE_OPENAI_EVAL_DEPLOYMENT=gpt-4
AZURE_OPENAI_EVAL_MODEL=gpt-4
AZURE_TENANT_ID=
AZURE_OPENAI_KEY=YOUR-AZURE-OPENAI-API-KEY

# Azure ML Configuration
AZURE_ML_SCORING_ENDPOINT=https://mlukrerankeraml-bgev2m3.southcentralus.inference.ml.azure.com/score
AZURE_ML_ENDPOINT_KEY=YOUR-AZURE-ML-ENDPOINT-KEY
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ Data_ingestion/.env
Data_ingestion/.ipynb_checkpoints
/src/frontend/node_modules/
*/package-lock.json
.azure
__pycache__/
*.js.map
*.pyc
src/backend/static/assets/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/age"]
path = vendor/age
url = https://github.com/apache/age.git
647 changes: 647 additions & 0 deletions Data_ingestion/backend.ipynb

Large diffs are not rendered by default.

4,238 changes: 4,238 additions & 0 deletions Data_ingestion/poetry.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Data_ingestion/poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[virtualenvs]
create = true
29 changes: 29 additions & 0 deletions Data_ingestion/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[tool.poetry]
name = "data-ingestion"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = ">=3.11,<3.13"
graspologic = "^3.4.1"
jupyter = "^1.1.1"
pandas = "^2.2.3"
openai = "0.28.0"
future = "^1.0.0"
ipykernel = "^6.29.5"
psycopg2 = "^2.9.10"
python-dotenv = "^1.0.1"

[tool.poetry.group.dev.dependencies]
black = "*"
ipywidgets = "*"
isort = "*"
pylint = "*"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Loading

0 comments on commit e609329

Please sign in to comment.