Skip to content

Commit f3799eb

Browse files
author
Nihhaar Saini
committed
Enable usage in OpenAI streamed chat completions
2 parents eb900be + 48d8762 commit f3799eb

File tree

1,032 files changed

+65553
-57599
lines changed

Some content is hidden

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

1,032 files changed

+65553
-57599
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
rm package-lock.json
2828
npm install -g npm@latest
2929
npm install
30+
npm run build
3031
npm run test
3132
3233
api-test:
@@ -51,7 +52,15 @@ jobs:
5152
pip install -r ./tests/ci/requirements.txt
5253
./tests/ci/api-test.py
5354
55+
- uses: actions/upload-artifact@v4
56+
if: ${{ !cancelled() }}
57+
with:
58+
name: (api-test) server-logs
59+
path: /tmp/backend.log
60+
retention-days: 3
61+
5462
playwright-test:
63+
if: false
5564
name: puterjs (browser env, playwright)
5665
runs-on: ubuntu-latest
5766
timeout-minutes: 10
@@ -84,7 +93,7 @@ jobs:
8493
- uses: actions/upload-artifact@v4
8594
if: ${{ !cancelled() }}
8695
with:
87-
name: server-logs
96+
name: (playwright) server-logs
8897
path: |
8998
/tmp/backend.log
9099
/tmp/fs-tree-manager.log
@@ -93,7 +102,7 @@ jobs:
93102
- uses: actions/upload-artifact@v4
94103
if: ${{ !cancelled() }}
95104
with:
96-
name: config-files
105+
name: (playwright) config-files
97106
path: |
98107
./volatile/config/config.json
99108
./src/fs_tree_manager/config.yaml
@@ -104,7 +113,7 @@ jobs:
104113
if: ${{ !cancelled() }}
105114
id: playwright-report
106115
with:
107-
name: playwright-report
116+
name: (playwright) playwright-report
108117
path: tests/playwright/playwright-report/
109118
retention-days: 3
110119

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ COPY package*.json ./
2424
COPY . .
2525

2626
# Install mocha
27+
RUN npm i -g npm@latest
2728
RUN npm install -g mocha
2829

2930
# Install node modules

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
## Puter
2929

30-
Puter is an advanced, open-source internet operating system designed to be feature-rich, exceptionally fast, and highly extensible. Puter can be used as:
30+
Puter is an advanced, open-source internet operating system designed to be feature-rich, fast, and highly extensible. Puter can be used as:
3131

3232
- A privacy-first personal cloud to keep all your files, apps, and games in one secure place, accessible from anywhere at any time.
3333
- A platform for building and publishing websites, web apps, and games.
@@ -152,7 +152,7 @@ This repository, including all its contents, sub-projects, modules, and componen
152152
- [Farsi / فارسی](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.fa.md)
153153
- [Finnish / Suomi](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.fi.md)
154154
- [French / Français](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.fr.md)
155-
- [German/ Deutsch](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.de.md)
155+
- [German / Deutsch](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.de.md)
156156
- [Hebrew/ עברית](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.he.md)
157157
- [Hindi / हिंदी](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.hi.md)
158158
- [Hungarian / Magyar](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.hu.md)

doc/contributors/extensions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ in order to access `db` from callbacks.
6767
```javascript
6868
const ext = extension;
6969

70-
extension.get('/user-count', { noauth: true }, (req, res) => {
70+
extension.get('/user-count', { noauth: true, mw: [] }, (req, res) => {
7171
const [count] = await ext.db.read(
7272
'SELECT COUNT(*) as c FROM `user`'
7373
);

doc/contributors/extensions/gen.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ import events from './events.json.js';
44
const mdlib = {};
55
mdlib.h = (out, n, str) => {
66
out(`${'#'.repeat(n)} ${str}\n\n`);
7-
}
7+
};
88

99
const N_START = 3;
1010

1111
const out = str => process.stdout.write(str);
1212
for ( const event of events ) {
1313
mdlib.h(out, N_START, `\`${event.id}\``);
14-
out(dedent(event.description) + '\n\n');
15-
14+
out(`${dedent(event.description) }\n\n`);
15+
1616
for ( const k in event.properties ) {
1717
const prop = event.properties[k];
1818
mdlib.h(out, N_START + 1, `Property \`${k}\``);
19-
out(prop.summary + '\n');
19+
out(`${prop.summary }\n`);
2020
out(`- **Type**: ${prop.type}\n`);
2121
out(`- **Mutability**: ${prop.mutability}\n`);
2222
if ( prop.notes ) {
23-
out(`- **Notes**:\n`);
23+
out('- **Notes**:\n');
2424
for ( const note of prop.notes ) {
2525
out(` - ${note}\n`);
2626
}
@@ -29,7 +29,7 @@ for ( const event of events ) {
2929
}
3030

3131
if ( event.example ) {
32-
mdlib.h(out, N_START + 1, `Example`);
32+
mdlib.h(out, N_START + 1, 'Example');
3333
out(`\`\`\`${event.example.language}\n${dedent(event.example.code)}\n\`\`\`\n`);
3434
}
3535

doc/contributors/extensions/manual_overrides.json.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ export default [
1212
summary: 'the email being validated',
1313
notes: [
1414
'The email may have already been cleaned.',
15-
]
15+
],
1616
},
1717
allow: {
1818
type: 'boolean',
1919
mutability: 'mutable',
2020
summary: 'whether the email is allowed',
2121
notes: [
2222
'If set to false, the email will be considered invalid.',
23-
]
23+
],
2424
},
2525
},
2626
},
@@ -44,8 +44,8 @@ export default [
4444
measurements: data.measurements
4545
});
4646
});
47-
`
48-
}
47+
`,
48+
},
4949
},
5050
{
5151
id: 'core.fs.create.directory',
@@ -61,8 +61,8 @@ export default [
6161
context: {
6262
type: 'Context',
6363
mutability: 'no-effect',
64-
summary: 'current context'
64+
summary: 'current context',
6565
},
66-
}
66+
},
6767
},
6868
];

doc/i18n/README.pa.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
<h3 align="center"><img width="80" alt="Puter.com, The Personal Cloud Computer: All your files, apps, and games in one place accessible from anywhere at any time." src="https://assets.puter.site/puter-logo.png"></h3>
2+
3+
<h3 align="center">ਇੰਟਰਨੇਟ ਓਐਸ! ਮੁਫ਼ਤ, ਖੁੱਲ੍ਹੇ ਸਰੋਤ ਵਾਲਾ, ਅਤੇ ਆਪ ਸਵੈ-ਹੋਸਟ ਕਰ ਸਕਦੇ ਹੋ।</h3>
4+
5+
<p align="center">
6+
<a href="https://puter.com/?ref=github.com"><strong>« LIVE DEMO »</strong></a>
7+
<br />
8+
<br />
9+
<a href="https://puter.com/?ref=github.com">Puter.com</a>
10+
·
11+
<a href="https://puter.com/app/app-center">ਐਪ ਸਟੋਰ</a>
12+
·
13+
<a href="https://developer.puter.com" target="_blank">ਡਿਵੈਲਪਰ</a>
14+
·
15+
<a href="https://github.com/heyputer/puter-cli" target="_blank">CLI</a>
16+
·
17+
<a href="https://discord.com/invite/PQcx7Teh8u">Discord</a>
18+
·
19+
<a href="https://reddit.com/r/puter">Reddit</a>
20+
·
21+
<a href="https://twitter.com/HeyPuter">X</a>
22+
</p>
23+
24+
<h3 align="center"><img width="800" style="border-radius:5px;" alt="screenshot" src="https://assets.puter.site/puter.com-screenshot-3.webp"></h3>
25+
26+
<br/>
27+
28+
## Puter
29+
30+
Puter ਇੱਕ ਵਿਕਸਤ, ਖੁੱਲ੍ਹਾ-ਸਰੋਤ ਇੰਟਰਨੇਟ ਓਪਰੇਟਿੰਗ ਸਿਸਟਮ ਹੈ ਜੋ ਫੀਚਰ-ਭਰਪੂਰ, ਬਹੁਤ ਤੇਜ਼, ਅਤੇ ਵਧੀਆ ਤਰੀਕੇ ਨਾਲ ਵਧਾਏ ਜਾਣ ਵਾਲਾ ਬਣਾਇਆ ਗਿਆ ਹੈ। Puter ਇਸ ਤਰ੍ਹਾਂ ਵਰਤਿਆ ਜਾ ਸਕਦਾ ਹੈ:
31+
32+
- ਇੱਕ ਪਰਾਈਵੇਸੀ-ਪਹਿਲਾਂ ਨਿੱਜੀ ਕਲਾਊਡ ਵਜੋਂ ਜਿੱਥੇ ਤੁਹਾਡੀਆਂ ਸਾਰੀਆਂ ਫਾਈਲਾਂ, ਐਪਸ, ਅਤੇ ਗੇਮਜ਼ ਇੱਕ ਸੁਰੱਖਿਅਤ ਜਗ੍ਹਾ 'ਤੇ, ਕਿਸੇ ਵੀ ਸਮੇਂ-ਕਿਤੇ ਵੀ ਤੋਂ ਪਹੁੰਚਯੋਗ।
33+
- ਵੈਬਸਾਈਟਾਂ, ਵੈਬ ਐਪਸ, ਅਤੇ ਗੇਮ ਬਣਾਉਣ ਅਤੇ ਪ੍ਰਕਾਸ਼ਿਤ ਕਰਨ ਲਈ ਇੱਕ ਪਲੇਟਫਾਰਮ।
34+
- Dropbox, Google Drive, OneDrive ਆਦਿ ਦਾ ਇੱਕ ਆਧੁਨਿਕ ਵਿਕਲਪ, ਨਵੀਂ ਇੰਟਰਫੇਸ ਅਤੇ ਸ਼ਕਤੀਸ਼ਾਲੀ ਫੀਚਰਾਂ ਨਾਲ।
35+
- ਸਰਵਰਾਂ ਅਤੇ ਵਰਕਸਟੇਸ਼ਨਾਂ ਲਈ ਰਿਮੋਟ ਡੈਸਕਟਾਪ Environment।
36+
- ਵੈਬ ਡਿਵੈਲਪਮੈਂਟ, ਕਲਾਊਡ ਕੰਪਿਊਟਿੰਗ, ਡਿਸਟ੍ਰੀਬਿਊਟਡ ਸਿਸਟਮ ਅਤੇ ਹੋਰ ਬਹੁਤ ਕੁਝ ਸਿੱਖਣ ਲਈ ਇੱਕ ਮਿੱਤਰਤਾਪੂ, ਖੁੱਲ੍ਹੇ-ਸਰੋਤ ਵਾਲਾ ਪ੍ਰੋਜੈਕਟ ਅਤੇ ਸਮੂਹ!
37+
38+
<br/>
39+
40+
## Getting Started
41+
42+
### 💻 Local Development
43+
44+
```bash
45+
git clone https://github.com/HeyPuter/puter
46+
cd puter
47+
npm install
48+
npm start
49+
```
50+
**** ਇਹ Puter ਨੂੰ ਇਸ ਪਤੇ 'ਤੇ ਚਲਾਉਣਾ ਚਾਹੀਦਾ ਹੈ
51+
<font color="red"> http://puter.localhost:4100 (ਜਾਂ ਅਗਲਾ ਉਪਲਬਧ ਪੋਰਟ). </font>
52+
53+
ਜੇ ਇਹ ਕੰਮ ਨਹੀਂ ਕਰਦਾ, ਤਾੰ [First Run Issues](./doc/self-hosters/first-run-issues.md) ਵੇਖੋ
54+
ਟ੍ਰਬਲਸ਼ੂਟਿੰਗ ਲਈ।
55+
56+
<br/>
57+
58+
### 🐳 Docker
59+
60+
```bash
61+
mkdir puter && cd puter && mkdir -p puter/config puter/data && sudo chown -R 1000:1000 puter && docker run --rm -p 4100:4100 -v `pwd`/puter/config:/etc/puter -v `pwd`/puter/data:/var/puter ghcr.io/heyputer/puter
62+
```
63+
**** ਇਹ Puter ਨੂੰ ਇਸ ਪਤੇ 'ਤੇ ਚਲਾਉਣਾ ਚਾਹੀਦਾ ਹੈ
64+
<font color="red"> http://puter.localhost:4100 (ਜਾਂ ਅਗਲਾ ਉਪਲਬਧ ਪੋਰਟ). </font>
65+
66+
<br/>
67+
68+
### 🐙 Docker Compose
69+
70+
#### Linux/macOS
71+
72+
```bash
73+
mkdir -p puter/config puter/data
74+
sudo chown -R 1000:1000 puter
75+
wget https://raw.githubusercontent.com/HeyPuter/puter/main/docker-compose.yml
76+
docker compose up
77+
```
78+
**** ਇਹ ਇਸ ਪਤੇ 'ਤੇ ਉਪਲਬਧ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ
79+
<font color="red"> http://puter.localhost:4100 (ਜਾਂ ਅਗਲਾ ਉਪਲਬਧ ਪੋਰਟ). </font>
80+
81+
<br/>
82+
83+
#### Windows
84+
85+
```powershell
86+
mkdir -p puter
87+
cd puter
88+
New-Item -Path "puter\config" -ItemType Directory -Force
89+
New-Item -Path "puter\data" -ItemType Directory -Force
90+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/HeyPuter/puter/main/docker-compose.yml" -OutFile "docker-compose.yml"
91+
docker compose up
92+
```
93+
**** ਇਹ Puter ਨੂੰ ਇਸ ਪਤੇ 'ਤੇ ਚਲਾਉਣਾ ਚਾਹੀਦਾ ਹੈ
94+
<font color="red"> http://puter.localhost:4100 (ਜਾਂ ਅਗਲਾ ਉਪਲਬਧ ਪੋਰਟ). </font>
95+
96+
<br/>
97+
98+
### 🚀 Self-Hosting
99+
100+
Puter ਨੂੰ ਖੁਦ ਹੋਸਟ ਕਰਨ ਲਈ, ਕਨਫਿਗੁਰੇਸ਼ਨ ਵਿਕਲਪ ਅਤੇ ਬਿਹਤਰੀਨ ਕਾਇਦੇ, ਸਾਰੇ ਵਿਸਥਾਰ ਲਈ ਸਾਡੇ [Self-Hosting Documentation](https://github.com/HeyPuter/puter/blob/main/doc/self-hosters/instructions.md) ਵੇਖੋ।
101+
102+
<br/>
103+
104+
### ☁️ Puter.com
105+
106+
Puter [**puter.com**](https://puter.com) 'ਤੇ ਇੱਕ ਹੋਸਟ ਕੀਤੀ ਸੇਵਾ ਵਜੋਂ ਉਪਲਬਧ ਹੈ।
107+
108+
<br/>
109+
110+
## System Requirements
111+
112+
- **Operating Systems:** Linux, macOS, Windows
113+
- **RAM:** ਘੱਟੋ-ਘੱਟ 2GB (4GB ਸਿਫ਼ਾਰਸ਼ੀ)
114+
- **Disk Space:** 1GB ਖਾਲੀ ਜਗ੍ਹਾ
115+
- **Node.js:** Version 20.19.5+ (23+ ਸਿਫ਼ਾਰਸ਼ੀ)
116+
- **npm:** ਨਵੀਨਤਮ ਸਥਿਰ ਵਰਜਨ
117+
118+
<br/>
119+
120+
## Support
121+
122+
ਮੈਂਟੇਨਰਾਂ ਅਤੇ ਕਮਿਊਨਿਟੀ ਨਾਲ ਇੱਥੇ ਸੰਪਰਕ ਕਰੋ:
123+
124+
- ਬੱਗ ਜਾਂ ਫੀਚਰ ਰਿਕਵੇਸਟ? ਕਿਰਪਾ ਕਰਕੇ [issue ਖੋਲ੍ਹੋ](https://github.com/HeyPuter/puter/issues/new/choose)
125+
- Discord: [discord.com/invite/PQcx7Teh8u](https://discord.com/invite/PQcx7Teh8u)
126+
- X (Twitter): [x.com/HeyPuter](https://x.com/HeyPuter)
127+
- Reddit: [reddit.com/r/puter/](https://www.reddit.com/r/puter/)
128+
- Mastodon: [mastodon.social/@puter](https://mastodon.social/@puter)
129+
- ਸੁਰੱਖਿਆ ਮਸਲੇ? [security@puter.com](mailto:security@puter.com)
130+
- ਮੇਂਟੇਨਰਾਂ ਨੂੰ ਈਮੇਲ ਕਰੋ [hi@puter.com](mailto:hi@puter.com)
131+
132+
ਅਸੀਂ ਹਮੇਸ਼ਾ ਤੁਹਾਡੀਆਂ ਕਿਸੇ ਵੀ ਪ੍ਰਸ਼ਨਾਂ ਵਿੱਚ ਮਦਦ ਕਰਨ ਲਈ ਤਿਆਰ ਹਾਂ। ਬੇਝਿਝਕ ਪੁੱਛੋ!
133+
134+
<br/>
135+
136+
## License
137+
138+
ਇਹ ਰਿਪੋਜ਼ਟਰੀ, ਆਪਣੇ ਸਾਰੇ ਸਮੱਗਰੀ, ਸਬ-ਪ੍ਰੋਜੈਕਟ, ਮੋਡੀਊਲ, ਅਤੇ ਕੰਪੋਨੈਂਟ ਸਮੇਤ, [AGPL-3.0](https://github.com/HeyPuter/puter/blob/main/LICENSE.txt) ਅਧੀਨ ਲਾਇਸੈਂਸਡ ਹੈ ਜੇ ਤਕ ਹੋਰ ਸਪਸ਼ਟ ਤੌਰ 'ਤੇ ਨਹੀਂ ਕਿਹਾ ਗਿਆ। ਤੀਜੀ ਪੱਖ ਦੀਆਂ ਲਾਇਬ੍ਰੇਰੀਆਂ ਆਪਣੇ ਲਾਇਸੈਂਸਾਂ ਅਨੁਸਾਰ ਹੋ ਸਕਦੀਆਂ ਹਨ।
139+
140+
<br/>
141+
142+
## Translations
143+
144+
- [Arabic / العربية](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ar.md)
145+
- [Armenian / Հայերեն](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.hy.md)
146+
- [Bengali / বাংলা](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.bn.md)
147+
- [Chinese / 中文](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.zh.md)
148+
- [Danish / Dansk](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.da.md)
149+
- [English](https://github.com/HeyPuter/puter/blob/main/README.md)
150+
- [Farsi / فارسی](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.fa.md)
151+
- [Finnish / Suomi](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.fi.md)
152+
- [French / Français](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.fr.md)
153+
- [German / Deutsch](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.de.md)
154+
- [Hebrew/ עברית](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.he.md)
155+
- [Hindi / हिंदी](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.hi.md)
156+
- [Hungarian / Magyar](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.hu.md)
157+
- [Indonesian / Bahasa Indonesia](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.id.md)
158+
- [Italian / Italiano](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.it.md)
159+
- [Japanese / 日本語](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.jp.md)
160+
- [Korean / 한국어](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ko.md)
161+
- [Malay / Bahasa Malaysia](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.my.md)
162+
- [Malayalam / മലയാളം](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ml.md)
163+
- [Punjabi / ਪੰਜਾਬੀ](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.pa.md)
164+
- [Polish / Polski](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.pl.md)
165+
- [Portuguese / Português](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.pt.md)
166+
- [Romanian / Română](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ro.md)
167+
- [Russian / Русский](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ru.md)
168+
- [Spanish / Español](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.es.md)
169+
- [Swedish / Svenska](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.sv.md)
170+
- [Tamil / தமிழ்](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ta.md)
171+
- [Telugu / తెలుగు](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.te.md)
172+
- [Thai / ไทย](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.th.md)
173+
- [Turkish / Türkçe](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.tr.md)
174+
- [Ukrainian / Українська](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ua.md)
175+
- [Urdu / اردو](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.ur.md)
176+
- [Vietnamese / Tiếng Việt](https://github.com/HeyPuter/puter/blob/main/doc/i18n/README.vi.md)
177+
178+
## Links to Other READMEs
179+
### Backend
180+
- [PuterAI Module](./src/backend/doc/modules/puterai/README.md)
181+
- [Metering Service](./src/backend/src/services/MeteringService/README.md)
182+
- [Extensions Development Guide](./extensions/README.md)

0 commit comments

Comments
 (0)