Skip to content

Commit e5ab165

Browse files
committed
first commit
1 parent 0fd8313 commit e5ab165

File tree

89 files changed

+11680
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+11680
-45
lines changed

.env.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
MSSQL='Server=.database.windows.net;Initial Catalog=;Persist Security Info=False;User ID=session_recommender_app;Password=unEno!h5!&*KP420xds&@P901afb$^M;MultipleActiveResultSets=False;Encrypt=True;Connection Timeout=30;'
2+
OPENAI.URL='https://.openai.azure.com'
3+
OPENAI.KEY=''

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Thanks to: https://rehansaeed.com/gitattributes-best-practices/
2+
3+
# Set default behavior to automatically normalize line endings.
4+
* text=auto
5+
6+
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
7+
# in Windows via a file share from Linux, the scripts will work.
8+
*.{cmd,[cC][mM][dD]} text eol=crlf
9+
*.{bat,[bB][aA][tT]} text eol=crlf
10+
11+
# Force bash scripts to always use LF line endings so that if a repo is accessed
12+
# in Unix via a file share from Windows, the scripts will work.
13+
*.sh text eol=lf

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,9 @@ FodyWeavers.xsd
396396

397397
# JetBrains Rider
398398
*.sln.iml
399+
400+
# Custom
401+
.env
402+
azuredeploy.parameters.json
403+
*.zip
404+
.azure/

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"ms-dotnettools.csharp"
5+
]
6+
}

.vscode/launch.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to .NET Functions",
6+
"type": "coreclr",
7+
"request": "attach",
8+
"processId": "${command:azureFunctions.pickProcess}"
9+
},
10+
{
11+
"name": "Run web app",
12+
"type": "node",
13+
"request": "launch",
14+
"cwd": "${workspaceFolder}",
15+
"runtimeExecutable": "swa",
16+
"runtimeArgs": ["start"],
17+
"presentation": {
18+
"hidden": false,
19+
"group": "Frontend",
20+
"order": 1
21+
},
22+
"preLaunchTask": "npm: install"
23+
}
24+
]
25+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"azureFunctions.deploySubpath": "api/bin/Release/net8.0/publish",
3+
"azureFunctions.projectLanguage": "C#",
4+
"azureFunctions.projectRuntime": "~4",
5+
"debug.internalConsoleOptions": "neverOpen",
6+
"azureFunctions.preDeployTask": "publish (functions)"
7+
}

.vscode/tasks.json

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "clean (functions)",
6+
"command": "dotnet",
7+
"args": [
8+
"clean",
9+
"/property:GenerateFullPaths=true",
10+
"/consoleloggerparameters:NoSummary"
11+
],
12+
"type": "process",
13+
"problemMatcher": "$msCompile",
14+
"options": {
15+
"cwd": "${workspaceFolder}/api"
16+
}
17+
},
18+
{
19+
"label": "build (functions)",
20+
"command": "dotnet",
21+
"args": [
22+
"build",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"type": "process",
27+
"dependsOn": "clean (functions)",
28+
"group": {
29+
"kind": "build",
30+
"isDefault": true
31+
},
32+
"problemMatcher": "$msCompile",
33+
"options": {
34+
"cwd": "${workspaceFolder}/api"
35+
}
36+
},
37+
{
38+
"label": "clean release (functions)",
39+
"command": "dotnet",
40+
"args": [
41+
"clean",
42+
"--configuration",
43+
"Release",
44+
"/property:GenerateFullPaths=true",
45+
"/consoleloggerparameters:NoSummary"
46+
],
47+
"type": "process",
48+
"problemMatcher": "$msCompile",
49+
"options": {
50+
"cwd": "${workspaceFolder}/api"
51+
}
52+
},
53+
{
54+
"label": "publish (functions)",
55+
"command": "dotnet",
56+
"args": [
57+
"publish",
58+
"--configuration",
59+
"Release",
60+
"/property:GenerateFullPaths=true",
61+
"/consoleloggerparameters:NoSummary"
62+
],
63+
"type": "process",
64+
"dependsOn": "clean release (functions)",
65+
"problemMatcher": "$msCompile",
66+
"options": {
67+
"cwd": "${workspaceFolder}/api"
68+
}
69+
},
70+
{
71+
"type": "func",
72+
"dependsOn": "build (functions)",
73+
"options": {
74+
"cwd": "${workspaceFolder}/api/bin/Debug/net8.0"
75+
},
76+
"command": "host start",
77+
"isBackground": true,
78+
"problemMatcher": "$func-dotnet-watch"
79+
},
80+
{
81+
"type": "npm",
82+
"options": {
83+
"cwd": "${workspaceFolder}/client"
84+
},
85+
"script": "install",
86+
"label": "npm: install"
87+
}
88+
]
89+
}

README.md

Lines changed: 26 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,38 @@
1-
# Project Name
1+
Coming Soon!
22

3-
(short, 1-3 sentenced, description of the project)
3+
In the meantime take a look at v1 of this project:
44

5-
## Features
5+
- https://sessionfinder.dotnetconf.net/
6+
- https://github.com/Azure-Samples/azure-sql-db-session-recommender
67

7-
This project framework provides the following features:
8+
# Session Recommender V2
89

9-
* Feature 1
10-
* Feature 2
11-
* ...
10+
Coming soon...
1211

13-
## Getting Started
1412

15-
### Prerequisites
13+
```
1614
17-
(ideally very short, if any)
15+
insert into web.sessions
16+
(title, abstract, external_id, start_time_PST, end_time_PST, require_embeddings_update)
17+
values
18+
(
19+
'Building a session recommender using OpenAI and Azure SQL',
20+
'In this fun and demo-driven session you’ll learn how to integrate Azure SQL with OpenAI to generate text embeddings, store them in the database, index them and calculate cosine distance to build a session recommender. And once that is done, you’ll publish it as a REST and GraphQL API to be consumed by a modern JavaScript frontend. Sounds pretty cool, uh? Well, it is!',
21+
'S1',
22+
'2024-03-10 10:00:00',
23+
'2024-03-10 11:00:00',
24+
1
25+
)
1826
19-
- OS
20-
- Library version
21-
- ...
27+
```
2228

23-
### Installation
29+
```
30+
swa start ./client --api-location ./func --data-api-location ./swa-db-connections
31+
```
2432

25-
(ideally very short)
33+
## Fluent UI
2634

27-
- npm install [package name]
28-
- mvn install
29-
- ...
35+
The solution uses Fluent UI for the UI components. The Fluent UI is a collection of UX frameworks from Microsoft that provides a consistent design language for web, mobile, and desktop applications. More details about Fluent UI can be found at the following links:
3036

31-
### Quickstart
32-
(Add steps to get up and running quickly)
33-
34-
1. git clone [repository clone url]
35-
2. cd [repository name]
36-
3. ...
37-
38-
39-
## Demo
40-
41-
A demo app is included to show how to use the project.
42-
43-
To run the demo, follow these steps:
44-
45-
(Add steps to start up the demo)
46-
47-
1.
48-
2.
49-
3.
50-
51-
## Resources
52-
53-
(Any additional resources or related projects)
54-
55-
- Link to supporting information
56-
- Link to similar sample
57-
- ...
37+
- https://github.com/microsoft/fluentui
38+
- https://react.fluentui.dev/

azure.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/Azure/azure-dev/main/schemas/v1.0/azure.yaml.json
2+
3+
name: azure-sql-db-session-recommender-v2
4+
metadata:
5+
template: azure-sql-db-session-recommender-v2
6+
services:
7+
web:
8+
project: ./client
9+
language: js
10+
host: staticwebapp
11+
dist: dist
12+
functionapp:
13+
project: ./func
14+
language: dotnet
15+
host: function

0 commit comments

Comments
 (0)