Skip to content

Commit

Permalink
Refactoring and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
akshata29 committed Mar 31, 2024
1 parent 3867ed5 commit 4639871
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 43 deletions.
8 changes: 1 addition & 7 deletions Deployment/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,7 @@
"name": "[variables('aspName')]",
"location": "[parameters('location')]",
"sku": {
"name": "B1",
"tier": "Basic",
"size": "B1",
"family": "B",
"capacity": 1
"name": "EP1"
},
"kind": "linux",
"properties": {
Expand Down Expand Up @@ -509,7 +505,6 @@
"httpsOnly": true,
"siteConfig": {
"linuxFxVersion": "DOCKER|ghcr.io/akshata29/entaoai-app",
"alwaysOn": true,
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
Expand Down Expand Up @@ -665,7 +660,6 @@
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('aspName'))]",
"siteConfig": {
"linuxFxVersion": "DOCKER|ghcr.io/akshata29/entaoai-python",
"alwaysOn": true,
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
Expand Down
48 changes: 30 additions & 18 deletions api/Python/.dockerenv.example
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
AzureWebJobsStorage=UseDevelopmentStorage=true
AzureWebJobs.HttpTrigger1.Disabled=false
AdminPassword=P@ssw0rd
UploadPassword=P@ssw0rd
OpenAiKey=
OpenAiEndPoint=https://dataaioaics.openai.azure.com/
OpenAiVersion=2023-05-15
OpenAiEmbedding=text-embedding-ada-002
MaxTokens=500
Temperature=0.3
AdminPassword=
UploadPassword=$
AzureWebJobsStorage=
OpenAiApiKey=
OpenAiChat=chat
FormRecognizerEndPoint=https://.cognitiveservices.azure.com/
OpenAiChat16k=chat16k
OpenAiVersion=2023-07-01-preview
OpenAiEmbedding=embedding
OpenAiKey=
OpenAiEndPoint=
FormRecognizerEndPoint=https://<>.cognitiveservices.azure.com
FormRecognizerKey=
PineconeKey=key
PineconeEnv=env
VsIndexName=oaiembed
RedisPassword=Password
RedisAddress=
RedisPort=6379
CosmosEndpoint=https://.documents.azure.com:443/
CosmosEndpoint=https://<>.documents.azure.com:443/
CosmosKey=
CosmosDatabase=aoai
CosmosContainer=chatgpt
OpenAiDocStorName=dataaiopenaistor
WeatherEndPoint=https://<>.p.rapidapi.com/weather
WeatherHost=<>.p.rapidapi.com
StockEndPoint=https://<>.p.rapidapi.com/query
StockHost=<>.p.rapidapi.com
RapidApiKey=
MaxTokens=500,
Temperature=0.3,
PineconeKey=
PineconeEnv=https://<>.svc.gcp-starter.pinecone.io
VsIndexName=oaiembed
RedisPassword=
RedisAddress=
RedisPort=6379
OpenAiDocStorName=
OpenAiDocStorConnString=
OpenAiDocStorKey=
OpenAiDocContainer=chatpdf
KbIndexName=aoaikb
SearchService=dataaioaicg
SearchKey=
SearchKey=
BingUrl=https://api.bing.microsoft.com/v7.0/search
BingKey=
2 changes: 1 addition & 1 deletion api/Python/.dockerrun
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ echo <PAT_TOKEN> | docker login ghcr.io -u akshata29 --password-stdin
docker push ghcr.io/akshata29/entaoai-python:latest

-- Docker Run
docker run --env-file .dockerenv -p 7071:80 --name entaoai-python -it ghcr.io/akshata29/entaoai-python:latest
docker run --env-file .dockerenv -p 7072:80 --name entaoai-python -it ghcr.io/akshata29/entaoai-python:latest
78 changes: 62 additions & 16 deletions app/backend/.dockerenv.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,62 @@
BLOB_CONNECTION_STRING=
BLOB_CONTAINER_NAME=chatpdf
CHAT_URL=http://localhost:7071/api/ChatGpt?code=
DOCGENERATOR_URL=http://localhost:7071/api/DocGenerator?code=
INDEXMANAGEMENT_URL=http://localhost:7071/api/IndexManagement?code=
KBINDEXNAME=aoaikb
QA_URL=http://localhost:7071/api/QuestionAnswering?code=
SEARCHSERVICE=dataaioaicg
SEARCHKEY=
SPEECH_KEY=
SPEECH_REGION=southcentralus
VERIFYPASS_URL=http://localhost:7071/api/VerifyPassword?code=
COSMOSENDPOINT=https://.documents.azure.com:443/
COSMOSKEY=
COSMOSDATABASE=aoai
COSMOSCONTAINER=chatgpt
##################
#### Backend URL
##################
QA_URL="http://localhost:7071/api/QuestionAnswering?code="
VERIFYPASS_URL="http://localhost:7071/api/VerifyPassword?code="
INDEXMANAGEMENT_URL="http://localhost:7071/api/IndexManagement?code="
CHAT_URL="http://localhost:7071/api/ChatGpt?code="
DOCGENERATOR_URL="http://localhost:7071/api/DocGenerator?code="
CHATGPT_URL="http://localhost:7071/api/OpenChatGpt?code="

##################
#### Blob Storage
##################
BLOB_CONNECTION_STRING="" # Name of your Blob connection string where you will upload PDF to
BLOB_CONTAINER_NAME="chatpdf" # Name of your container to host uploaded files
BLOB_VIDEO_CONTAINER_NAME="videos"

##################
#### Azure Speech
##################
SPEECH_REGION="" # Your speech service region
SPEECH_KEY="" # Your speech service key

##################
#### Search Service
##################
SEARCHSERVICE=""
SEARCHKEY=""
KBINDEXNAME="aoaikb"

##################
#### Cosmos DB
##################
COSMOSENDPOINT="https://<>.documents.azure.com:443/"
COSMOSKEY=""
COSMOSDATABASE="aoai"
COSMOSCONTAINER="chatgpt"

##################
#### OpenAI
##################
OpenAiKey=""
OpenAiEndPoint="https://.openai.azure.com/"
OpenAiApiKey=""
OpenAiChat="chat"
OpenAiChat16k="chat16k"
OpenAiVersion="2023-07-01-preview"
OpenAiEmbedding="embedding"

##################
#### Redis
##################
RedisPassword=""
RedisAddress=""
RedisPort="6379"

##################
#### Pinecone
##################
PineconeKey=""
PineconeEnv="us-east-1-aws"
VsIndexName="oaiembed"
1 change: 1 addition & 0 deletions app/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ COPY . /home/site/wwwroot

EXPOSE 80
CMD python app.py
#CMD [ "python", "-m" , "flask", "run", "--host=0.0.0.0"]
2 changes: 1 addition & 1 deletion app/backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,4 +733,4 @@ def speech():
return jsonify({"error": str(e)}), 500

if __name__ == "__main__":
app.run(port=5002)
app.run(debug=True, host='0.0.0.0', port=5002)

0 comments on commit 4639871

Please sign in to comment.