Skip to content

Commit

Permalink
Add actions file and Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyshah83 committed Feb 14, 2024
1 parent 60abdbe commit 8ba6c12
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 29 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Python application deploy to Azure Functions

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v2

- name: 'Set up Python 3.11'
uses: actions/setup-python@v3
with:
python-version: 3.11

- name: 'Install dependencies'
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: <Your-Function-App-Name>
package: .
publish-profile: ${{ secrets.AZURE_PUBLISH_PROFILE }}

- name: 'Logout of Azure CLI'
run: |
az logout
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
US_Accidents_March23.csv
US_Accidents_March23.csv
/.venv/
29 changes: 1 addition & 28 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,4 @@ This demo is based on Kagglle data set of [US Accidents](https://www.kaggle.com/

### RAG

![alt text](image.png)

#### Multiple data source

```
from langchain.prompts import ChatPromptTemplate
system_message = """Use the information from the below two sources to answer any questions.
Source 1: a SQL database about employee data
<source1>
{source1}
</source1>
Source 2: a text database of random information
<source2>
{source2}
</source2>
"""
prompt = ChatPromptTemplate.from_messages([("system", system_message), ("human", "{question}")])
full_chain = {
"source1": {"question": lambda x: x["question"]} | db_chain.run,
"source2": (lambda x: x['question']) | retriever,
"question": lambda x: x['question'],
} | prompt | OpenAI()
```
![alt text](image.png)

0 comments on commit 8ba6c12

Please sign in to comment.