Skip to content

Commit c69bc0a

Browse files
committed
feat: add webapp
1 parent 41c48ef commit c69bc0a

23 files changed

+1336
-36
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!--
22
IF SUFFICIENT INFORMATION IS NOT PROVIDED VIA THE FOLLOWING TEMPLATE THE ISSUE MIGHT BE CLOSED WITHOUT FURTHER CONSIDERATION OR INVESTIGATION
33
-->
4-
> Please provide us with the following information:
5-
> ---------------------------------------------------------------
4+
5+
> ## Please provide us with the following information:
66
77
### This issue is for a: (mark with an `x`)
8+
89
```
910
- [ ] bug report -> please search issues before submitting
1011
- [ ] feature request
@@ -13,21 +14,27 @@ IF SUFFICIENT INFORMATION IS NOT PROVIDED VIA THE FOLLOWING TEMPLATE THE ISSUE M
1314
```
1415

1516
### Minimal steps to reproduce
17+
1618
>
1719
1820
### Any log messages given by the failure
21+
1922
>
2023
2124
### Expected/desired behavior
25+
2226
>
2327
2428
### OS and Version?
29+
2530
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
2631
2732
### Versions
33+
2834
>
2935
3036
### Mention any other details that might be useful
3137

32-
> ---------------------------------------------------------------
38+
> ---
39+
>
3340
> Thanks! We'll be in touch soon.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
## Purpose
2+
23
<!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? -->
3-
* ...
4+
5+
- ...
46

57
## Does this introduce a breaking change?
8+
69
<!-- Mark one with an "x". -->
10+
711
```
812
[ ] Yes
913
[ ] No
1014
```
1115

1216
## Pull Request Type
17+
1318
What kind of change does this Pull Request introduce?
1419

1520
<!-- Please check the one that applies to this PR using "x". -->
21+
1622
```
1723
[ ] Bugfix
1824
[ ] Feature
@@ -23,7 +29,8 @@ What kind of change does this Pull Request introduce?
2329
```
2430

2531
## How to Test
26-
* Get the code
32+
33+
- Get the code
2734

2835
```
2936
git clone [repo-address]
@@ -32,14 +39,19 @@ git checkout [branch-name]
3239
npm install
3340
```
3441

35-
* Test the code
42+
- Test the code
3643
<!-- Add steps to run the tests suite and/or manually test -->
44+
3745
```
46+
3847
```
3948

4049
## What to Check
50+
4151
Verify that the following are valid
42-
* ...
52+
53+
- ...
4354

4455
## Other Information
45-
<!-- Add any other helpful information that may be needed here. -->
56+
57+
<!-- Add any other helpful information that may be needed here. -->

CONTRIBUTING.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to [project-title]
22

3-
This project welcomes contributions and suggestions. Most contributions require you to agree to a
3+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
44
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
55
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
66

@@ -12,61 +12,67 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
1212
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
1313
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
1414

15-
- [Code of Conduct](#coc)
16-
- [Issues and Bugs](#issue)
17-
- [Feature Requests](#feature)
18-
- [Submission Guidelines](#submit)
15+
- [Code of Conduct](#coc)
16+
- [Issues and Bugs](#issue)
17+
- [Feature Requests](#feature)
18+
- [Submission Guidelines](#submit)
1919

2020
## <a name="coc"></a> Code of Conduct
21+
2122
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
2223

2324
## <a name="issue"></a> Found an Issue?
25+
2426
If you find a bug in the source code or a mistake in the documentation, you can help us by
2527
[submitting an issue](#submit-issue) to the GitHub Repository. Even better, you can
2628
[submit a Pull Request](#submit-pr) with a fix.
2729

2830
## <a name="feature"></a> Want a Feature?
29-
You can *request* a new feature by [submitting an issue](#submit-issue) to the GitHub
30-
Repository. If you would like to *implement* a new feature, please submit an issue with
31+
32+
You can _request_ a new feature by [submitting an issue](#submit-issue) to the GitHub
33+
Repository. If you would like to _implement_ a new feature, please submit an issue with
3134
a proposal for your work first, to be sure that we can use it.
3235

33-
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
36+
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
3437

3538
## <a name="submit"></a> Submission Guidelines
3639

3740
### <a name="submit-issue"></a> Submitting an Issue
41+
3842
Before you submit an issue, search the archive, maybe your question was already answered.
3943

4044
If your issue appears to be a bug, and hasn't been reported, open a new issue.
4145
Help us to maximize the effort we can spend fixing issues and adding new
42-
features, by not reporting duplicate issues. Providing the following information will increase the
46+
features, by not reporting duplicate issues. Providing the following information will increase the
4347
chances of your issue being dealt with quickly:
4448

45-
* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
46-
* **Version** - what version is affected (e.g. 0.1.2)
47-
* **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
48-
* **Browsers and Operating System** - is this a problem with all browsers?
49-
* **Reproduce the Error** - provide a live example or a unambiguous set of steps
50-
* **Related Issues** - has a similar issue been reported before?
51-
* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
49+
- **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
50+
- **Version** - what version is affected (e.g. 0.1.2)
51+
- **Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
52+
- **Browsers and Operating System** - is this a problem with all browsers?
53+
- **Reproduce the Error** - provide a live example or a unambiguous set of steps
54+
- **Related Issues** - has a similar issue been reported before?
55+
- **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
5256
causing the problem (line of code or commit)
5357

5458
You can file new issues by providing the above information at the corresponding repository's issues link: https://github.com/[organization-name]/[repository-name]/issues/new].
5559

5660
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
61+
5762
Before you submit your Pull Request (PR) consider the following guidelines:
5863

59-
* Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR
64+
- Search the repository (https://github.com/[organization-name]/[repository-name]/pulls) for an open or closed PR
6065
that relates to your submission. You don't want to duplicate effort.
6166

62-
* Make your changes in a new git fork:
67+
- Make your changes in a new git fork:
68+
69+
- Commit your changes using a descriptive commit message
70+
- Push your fork to GitHub:
71+
- In GitHub, create a pull request
72+
- If we suggest changes then:
6373

64-
* Commit your changes using a descriptive commit message
65-
* Push your fork to GitHub:
66-
* In GitHub, create a pull request
67-
* If we suggest changes then:
68-
* Make the required updates.
69-
* Rebase your fork and force push to your GitHub repository (this will update your Pull Request):
74+
- Make the required updates.
75+
- Rebase your fork and force push to your GitHub repository (this will update your Pull Request):
7076

7177
```shell
7278
git rebase master -i

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# 🤖⚡ serverless-ai-langchainjs
22

33
This sample shows how to build a serverless ChatGPT-like with Retrieval-Augmented Generation AI application using [Azure Static Web Apps](https://learn.microsoft.com/azure/static-web-apps/overview), [Azure Functions](https://learn.microsoft.com/azure/azure-functions/functions-overview?pivots=programming-language-javascript) and the [LangChain.js library](https://js.langchain.com/). This can be used as a starting point for building more complex AI applications.
4-

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
"scripts": {
88
"start": "echo not implemented",
99
"start:webapp": "npm run start --workspace=webapp",
10-
"start:api": "npm run start --workspace=api",
10+
"start:api": "npm run dev --workspace=api",
1111
"build": "npm run build --workspaces --if-present",
1212
"clean": "echo not implemented",
13+
"lint": "xo",
14+
"lint:fix": "xo --fix",
1315
"format": "prettier --list-different --write .",
1416
"prepare": "simple-git-hooks || echo 'simple-git-hooks install skipped'"
1517
},
@@ -41,8 +43,7 @@
4143
"pre-commit": "npx lint-staged"
4244
},
4345
"lint-staged": {
44-
"*.{js,ts}": "xo --fix",
45-
"*": "prettier --write"
46+
"*.{js,ts,json,md,yaml,yml,html,css}": "prettier --write"
4647
},
4748
"prettier": {
4849
"tabWidth": 2,

packages/webapp/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Chat webapp
2+
3+
This project uses [Vite](https://vitejs.dev/) as a frontend build tool, and [Lit](https://lit.dev/) as a web components library.
4+
5+
## Available Scripts
6+
7+
In the project directory, you can run:
8+
9+
### `npm run dev`
10+
11+
To start the app in dev mode.\
12+
Open [http://localhost:8000](http://localhost:8000) to view it in the browser.
13+
14+
### `npm run build`
15+
16+
To build the app for production to the `dist` folder.

packages/webapp/assets/lightbulb.svg

Lines changed: 1 addition & 0 deletions
Loading

packages/webapp/assets/new-chat.svg

Lines changed: 1 addition & 0 deletions
Loading

packages/webapp/assets/question.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)