Skip to content

Commit 29c5680

Browse files
committed
Port away from custom skill to built in AI Vision Vectorizer
1 parent 0b02db4 commit 29c5680

16 files changed

Lines changed: 163 additions & 561 deletions

app/backend/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ async def search():
5454
vector_queries=[
5555
VectorizableTextQuery(
5656
k=size,
57-
fields="vector",
57+
fields="embedding",
5858
text=search_text
5959
)
6060
],
61-
select="url"
61+
select="metadata_storage_path"
6262
)
6363
response_results = []
6464
async for result in results:
6565
response_results.append({
6666
"score": result["@search.score"],
67-
"url": result["url"]
67+
"url": result["metadata_storage_path"]
6868
})
6969
return jsonify(response_results)
7070

app/backend/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ aiohttp==3.11.0b0
33
azure-common==1.1.28
44
azure-core==1.29.7
55
azure-identity==1.16.1
6-
azure-search-documents==11.4.0b11
6+
azure-search-documents==11.7.0b1
77
azure-storage-blob==12.19.0
88
blinker==1.7.0
99
certifi==2024.7.4
@@ -23,7 +23,7 @@ isodate==0.6.1
2323
itsdangerous==2.1.2
2424
Jinja2==3.1.6
2525
MarkupSafe==2.1.4
26-
msal==1.26.0
26+
msal==1.34.0
2727
msal-extensions==1.1.0
2828
packaging==23.2
2929
portalocker==2.8.2

app/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ echo ""
4141

4242
cd ../backend
4343

44-
port=50505
44+
port=50509
4545
host=localhost
4646
../../.venv/bin/python -m quart --app main:app run --port "$port" --host "$host" --reload
4747
if [ $? -ne 0 ]; then

azure.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
name: ai-chat-app-hack-vision
44
services:
5-
api:
6-
project: ./customskill
7-
language: python
8-
host: function
95
aca:
106
project: ./app/backend
117
language: py
@@ -18,7 +14,7 @@ hooks:
1814
run: cd ./app/frontend;npm install;npm run build
1915
interactive: true
2016
continueOnError: false
21-
postdeploy:
17+
postprovision:
2218
windows:
2319
shell: pwsh
2420
run: python ./scripts/setup_search_service.py

customskill/.funcignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

customskill/.gitignore

Lines changed: 0 additions & 49 deletions
This file was deleted.

customskill/function_app.py

Lines changed: 0 additions & 114 deletions
This file was deleted.

customskill/host.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

customskill/requirements.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

infra/core/host/appservice.bicep

Lines changed: 0 additions & 99 deletions
This file was deleted.

0 commit comments

Comments
 (0)