Skip to content

Commit 736a854

Browse files
committed
Updating files
1 parent 1d33a2a commit 736a854

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

supporting-blog-content/enhance-microsoft-copilot-with-elasticsearch/invoices-api.ipynb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
" \"properties\": {\n",
109109
" \"id\": {\"type\": \"keyword\"},\n",
110110
" \"file_url\": {\"type\": \"keyword\"},\n",
111-
" \"issue_date\": {\"type\": \"date\", \"copy_to\": \"semantic_field\"},\n",
111+
" \"issue_date\": {\"type\": \"date\"},\n",
112112
" \"description\": {\"type\": \"text\", \"copy_to\": \"semantic_field\"},\n",
113113
" \"services\": {\n",
114114
" \"type\": \"object\",\n",
@@ -117,13 +117,12 @@
117117
" \"type\": \"text\",\n",
118118
" \"copy_to\": \"semantic_field\",\n",
119119
" },\n",
120-
" \"price\": {\n",
121-
" \"type\": \"float\",\n",
122-
" \"copy_to\": \"semantic_field\",\n",
123-
" },\n",
120+
" \"price\": {\"type\": \"float\"},\n",
124121
" },\n",
125122
" },\n",
126-
" \"total_amount\": {\"type\": \"float\", \"copy_to\": \"semantic_field\"},\n",
123+
" \"total_amount\": {\n",
124+
" \"type\": \"float\",\n",
125+
" },\n",
127126
" \"semantic_field\": {\"type\": \"semantic_text\"},\n",
128127
" }\n",
129128
" }\n",
@@ -359,7 +358,6 @@
359358
" results = [{\"score\": hit[\"_score\"], **hit[\"_source\"]} for hit in hits]\n",
360359
"\n",
361360
" return results\n",
362-
"\n",
363361
" except Exception as e:\n",
364362
" return Exception(f\"Error: {str(e)}\")\n",
365363
"\n",
@@ -390,7 +388,6 @@
390388
" results = [hit[\"_source\"] for hit in hits]\n",
391389
"\n",
392390
" return results\n",
393-
"\n",
394391
" except Exception as e:\n",
395392
" return Exception(f\"Error: {str(e)}\")"
396393
]

supporting-blog-content/enhance-microsoft-copilot-with-elasticsearch/openAPI-specification.json

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,9 @@
77
},
88
"host": "your-ngrok-host.ngrok.app",
99
"basePath": "/",
10-
"schemes": [
11-
"https"
12-
],
13-
"consumes": [
14-
"application/json"
15-
],
16-
"produces": [
17-
"application/json"
18-
],
10+
"schemes": ["https"],
11+
"consumes": ["application/json"],
12+
"produces": ["application/json"],
1913
"parameters": {
2014
"NgrokSkipWarningHeader": {
2115
"name": "ngrok-skip-browser-warning",
@@ -32,9 +26,7 @@
3226
"summary": "Semantic invoice search",
3327
"description": "Performs a semantic search on invoices based on the provided query using Elasticsearch's semantic capabilities",
3428
"operationId": "searchSemantic",
35-
"produces": [
36-
"application/json"
37-
],
29+
"produces": ["application/json"],
3830
"parameters": [
3931
{
4032
"$ref": "#/parameters/NgrokSkipWarningHeader"
@@ -85,9 +77,7 @@
8577
"summary": "Search invoices by date range",
8678
"description": "Performs a search on invoices based on a specified date range using Elasticsearch",
8779
"operationId": "searchByDate",
88-
"produces": [
89-
"application/json"
90-
],
80+
"produces": ["application/json"],
9181
"parameters": [
9282
{
9383
"$ref": "#/parameters/NgrokSkipWarningHeader"
@@ -147,4 +137,4 @@
147137
}
148138
}
149139
}
150-
}
140+
}

0 commit comments

Comments
 (0)