Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8fd2cbc
Draft of chat+voice
hejny Sep 9, 2023
101877e
Add Chat component
hejny Sep 9, 2023
de61b1b
Organize journal
hejny Sep 9, 2023
6549557
En
hejny Sep 9, 2023
3d0fc08
Enhance UI and UX of Chat and Journal
hejny Sep 9, 2023
b8975d7
Speak only when allowed
hejny Sep 9, 2023
d16d356
Autofocus
hejny Sep 9, 2023
8cb7fe5
focusRef
hejny Sep 9, 2023
2aca972
Enhance UI and UX of Chat and Journal
hejny Sep 9, 2023
e82dbb1
Autofocus
hejny Sep 9, 2023
8588193
Voice in journal
hejny Sep 9, 2023
4f4e2ae
Cleanup TODOs
hejny Sep 9, 2023
044ae80
Merge branch 'main' into feature/chat+voice
hejny Sep 9, 2023
5a0bc8d
Merge branch 'main' into feature/chat+voice
hejny Sep 13, 2023
b42b600
Merge branch 'main' into feature/chat+voice
hejny Sep 15, 2023
d81985f
Merge branch 'main' into feature/chat+voice
hejny Sep 15, 2023
4edfb87
Merge branch 'main' into feature/chat+voice
hejny Sep 18, 2023
afe0835
Fix merge imports + dependencies
hejny Sep 18, 2023
0fc35f8
Merge branch 'main' into feature/chat+voice
hejny Nov 30, 2023
7a283d3
Merge branch 'main' into feature/chat+voice
hejny Nov 30, 2023
f810384
Fix types
hejny Nov 30, 2023
b4eea4c
Styling of <Journal/> and <Chat/>
hejny Nov 30, 2023
393c519
TODOs
hejny Nov 30, 2023
d4686b9
Rename <Journal/> -> <SimpleChat/*>
hejny Nov 30, 2023
b5a0f87
Update avatars and add chat scenario
hejny Nov 30, 2023
c9c17d2
� Trigger deployment
hejny Nov 30, 2023
db2a697
Add WorkerChat component for running async
hejny Nov 30, 2023
0e92798
Improve layout and add chat window styling
hejny Nov 30, 2023
6d0fa58
Fix dialogue queue error in WorkerChat component
hejny Nov 30, 2023
66d2eb6
Merge branch 'main' into feature/chat+voice
hejny Dec 1, 2023
5c6d149
Merge branch 'main' into feature/chat+voice
hejny Dec 6, 2023
cdc5ba0
Merge branch 'main' into feature/chat+voice
hejny Dec 6, 2023
aedd3c2
TODOs
hejny Dec 6, 2023
f38f1b3
Integrating ElevenLabs (but not working yet)
hejny Dec 6, 2023
417eff7
Integrating ElevenLabs (but not working yet)
hejny Dec 7, 2023
786ef9b
Integrating ElevenLabs (but not working yet)
hejny Dec 7, 2023
a7c28ba
Speaking Pavol Hejny
hejny Dec 8, 2023
b035111
Speech library
hejny Dec 8, 2023
5e47ff3
TODOs
hejny Dec 8, 2023
53a946d
Avatars in chat
hejny Dec 8, 2023
238e917
TODOs
hejny Dec 8, 2023
1558ebf
Cleanup
hejny Dec 8, 2023
ed06c2c
More logging
hejny Dec 8, 2023
e1fd7d6
More logging
hejny Dec 8, 2023
512c3e5
More logging
hejny Dec 9, 2023
d868efd
TODOs
hejny Dec 9, 2023
9930c6b
Update write-website-content-cs.ptbk.md
hejny Dec 9, 2023
1a85877
Update write-website-content-cs.ptbk.md
hejny Dec 9, 2023
45104a4
Merge branch 'feature/chat+voice' of https://github.com/hejny/webgpt …
hejny Dec 9, 2023
c2a8881
Make cache in CDN
hejny Dec 9, 2023
4b0bffe
TextToSpeechPage
hejny Dec 9, 2023
375193e
TODOs
hejny Dec 9, 2023
e6695ca
Moving promptbook/editor
hejny Dec 9, 2023
af82a6b
<PromptbookCompiler/>
hejny Dec 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import { DigitalOceanSpaces } from './src/utils/cdn/classes/DigitalOceanSpaces';
import { createColorfulComputeImageColorStats15 } from './src/utils/image/palette/15/createColorfulComputeImageColorStats15';
import type { IComputeImageColorStats } from './src/utils/image/utils/IImageColorStats';
import { isRunningInBrowser } from './src/utils/isRunningInWhatever';
import { string_font_family } from './src/utils/typeAliases';
import type { string_email, string_font_family, string_name, string_token } from './src/utils/typeAliases';
import { isUrlOnPrivateNetwork } from './src/utils/validators/isUrlOnPrivateNetwork';
import { validateUuid } from './src/utils/validators/validateUuid';

export const APP_VERSION = packageJson.version;
export const APP_NAME = 'WebGPT';
export const ADMIN_EMAIL: string_email = 'pavol@webgpt.cz';

export const USE_DALLE_VERSION: 2 | 3 = 3;

Expand Down Expand Up @@ -100,16 +101,14 @@ export const PHOTOBANK_SEARCH_IMAGES_COUNT = 4;
*/
export const OPTIMIZE_PHOTOBANK_MAX_SEARCH_DEPTH = 5;



export const IS_VERIFIED_EMAIL_REQUIRED = {
CREATE: false,
EDIT: false,
LIKE: false,
PUBLISH: true,
SPEECH: false,
} as const;


export const NEXT_PUBLIC_SUPABASE_URL = config.get('NEXT_PUBLIC_SUPABASE_URL').url().required().value;
export const NEXT_PUBLIC_SUPABASE_ANON_KEY = config.get('NEXT_PUBLIC_SUPABASE_ANON_KEY').required().value;
export const SUPABASE_SERVICE_ROLE_KEY = config.get('SUPABASE_SERVICE_ROLE_KEY').value;
Expand All @@ -125,6 +124,9 @@ export const LIMIT_WALLPAPERS_EXCLUDE = config.get('LIMIT_WALLPAPERS_EXCLUDE').l

export const OPENAI_API_KEY = config.get('OPENAI_API_KEY').value;

export const ELEVENLABS_API_KEY = config.get('ELEVENLABS_API_KEY').value;
export const ELEVENLABS_VOICE_IDS: Record<string_name, string_token> = config.get('ELEVENLABS_VOICE_IDS').json().value;

export const AZURE_COMPUTER_VISION_ENDPOINT = config.get('AZURE_COMPUTER_VISION_ENDPOINT').url().value;
export const AZURE_COMPUTER_VISION_KEY = config.get('AZURE_COMPUTER_VISION_KEY').value;

Expand Down Expand Up @@ -1078,8 +1080,7 @@ export const PUBLISH_TO_GITHUB_ORGANIZATION = config.get(
).value;
export const GITHUB_TOKEN = config.get('GITHUB_TOKEN', `@see https://github.com/settings/tokens`).value;


/**
* TODO: !! Annotate all
* TODO: [📙] Every dictionary should look like LikedStatus
*/
*/
114 changes: 109 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@
"@promptbook/types": "0.18.0",
"@promptbook/utils": "0.18.0",
"@supabase/supabase-js": "2.26.0",
"@types/dom-speech-recognition": "^0.0.1",
"@types/file-saver": "2.0.5",
"@vercel/og": "0.5.8",
"babylonjs": "6.17.0",
"configchecker": "1.5.1",
"crypto-js": "4.1.1",
"destroyable": "0.12.0",
"elevenlabs-node": "^2.0.1",
"everstorage": "1.13.0",
"express": "4.18.2",
"file-saver": "2.0.5",
Expand Down
74 changes: 9 additions & 65 deletions promptbook/write-website-content-cs.ptbk.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 🌍 Vytvoření obsahu webové stránky

<!--!!! special promptbook for voice -->
<!--!!! There is problem with infinite loop of sending requests to OpenAI - Inspect deeper and if connected with promptbook, it should be handled at the level of the promptbook -->

Instrukce pro vytvoření obsahu webové stránky za pomocí [🌠 Prompt template pipelines](https://github.com/webgptorg/promptbook).

- PTBK URL https://ptbk.webgpt.com/cs/write-website-content.ptbk.md@v0.1.0
Expand All @@ -12,69 +15,15 @@ Instrukce pro vytvoření obsahu webové stránky za pomocí [🌠 Prompt templa
- Output param `{content}` Obsah webu _v Češtině_
- Output param `{wallpaperPrompt}` Prompt pro obrázkový model _v Angličtině_<!-- TODO: !!> , pouze pokud není zadán ... -->

## 🖋 Překlad popisu

- Use completion
- Postprocessing `trim`
<!-- TODO: !!> Skip if `rawAssignment===''` -->

```text

English assignment:
> {rawAssignment}

České zadání:
>
```

`-> {rawAssignmentCs}` popis obrázku v češtině

## 🖋 Účel stránek

- Use completion
- Postprocessing `unwrapResult`

```markdown
Navrhni účel webových stránek

## Pravidla

- Piš jediný návrh, neříkej více možností
- Navrhni obecnou kategorii, např. "Autoservis" ne "Autoservis Pod Ohradou"
- Návrh je v češtině
- Návrh je stručný, maximálně 3 slova

## Příklady

- "Kavárna"
- "Autoservis"
- "Dětská herna"
- "Svatba"
- "Osobní stránka fotografa"

## Podklady

- Idea: {idea}
- Zadání: {rawAssignmentCs}

## Účel webu

>
```

`-> {draftedPurpose}`Návrh účelu webu

## 👤 Upřesnění účelu uživatelem
## Mapping

Je toto účelem vašeho webu?

- Prompt dialog
- Execute simple template

```text
{draftedPurpose}
{idea}
```

`-> {purpose}` Účel webu
-> {purpose}

## 🖋 Návrh zadání

Expand All @@ -91,21 +40,16 @@ Vytvoř zadání reálného webu pro {purpose} z čistého popisu co se nacház
- Zadání obsahuje konkrétní čísla, odrážky a je přesné
- Stručně, maximálně 4 body zadání, každý bod je maximálně 2 věty

## Podklady

- {idea}
- {rawAssignmentCs}

## Zadání webu v Češtině
```

`-> {draftedAssignment}` Zadání webu v Češtině

## 👤 Upřesnění zadání uživatelem
## Mapping

Popište cíl vašeho webu

- Prompt dialog
- Simple template

```text
{draftedAssignment}
Expand Down
Binary file added public/avatars/bot.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/avatars/teacher.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/people/tomas-studenik.transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions scripts/upload-wallpapers/10-upload-wallpapers-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { readFile } from 'fs/promises';
import { basename, join } from 'path';
import { forTime } from 'waitasecond';
import { CDN, MIDJOURNEY_WHOLE_GALLERY_PATH } from '../../config';
import { generatePreparedWallpaperCdnKey } from '../../src/utils/cdn/utils/generateWallpaperCdnKey';
import { getPreparedWallpaperCdnKey } from '../../src/utils/cdn/utils/getPreparedWallpaperCdnKey';
import { getSupabaseForServer } from '../../src/utils/supabase/getSupabaseForServer';
import { getHardcodedWallpapers } from '../utils/hardcoded-wallpaper/getHardcodedWallpapers';

Expand Down Expand Up @@ -48,7 +48,7 @@ async function uploadWallpapersImages() {

const wallpaper = selectResult.data[0]!;

const key = generatePreparedWallpaperCdnKey(wallpaper);
const key = getPreparedWallpaperCdnKey(wallpaper);
const file = await CDN.getItem(key);

if (file) {
Expand Down
7 changes: 7 additions & 0 deletions speech/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 🗣 Speech library

> Note: [🧆] Now unused, but will be used in the future.

In this folder you can find the library of spoken text.

This is kinda cache BUT persistent and commited to the repository.
Binary file added speech/pavol/ahoj.mp3
Binary file not shown.
Binary file added speech/pavol/jaky-web-chcete-vytvorit.mp3
Binary file not shown.
Binary file not shown.
Loading