-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from rti/bug/nodejs18_dockerfile
Bug/nodejs18 dockerfile
- Loading branch information
Showing
9 changed files
with
213 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<div class="flex space-x-6 text-light-text dark:text-dark-text"> | ||
<div class="p-2 text-2xl rounded-full bg-light-menu dark:bg-dark-menu h-min elem-shadow-sm"> | ||
<Icon icon="ooui:logo-wikimedia" /> | ||
</div> | ||
<div v-if="response && response.sources"> | ||
<div v-for="s in response.sources" :key="s.id"> | ||
<div v-if="s.score > 2" class="mb-2"> | ||
<details | ||
class="pt-2 text-sm cursor-pointer text-light-distinct-text dark:text-dark-distinct-text" | ||
> | ||
<summary> | ||
{{ $t('source') }} ({{ s.score.toFixed(1) }}/5): | ||
<a class="link-text" :href="s.src">{{ s.src }}</a> | ||
</summary> | ||
<p class="pt-2 pl-4">{{ s.content }}</p> | ||
</details> | ||
</div> | ||
</div> | ||
<div v-if="response" class="text-lg"> | ||
{{ response.answer }} | ||
</div> | ||
</div> | ||
<div v-else class="text-lg"> | ||
{{ $t('no-response-message') }} | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue' | ||
import type { ResponseObject } from '../../types/response-object.d.ts' | ||
defineProps<{ | ||
response?: ResponseObject | ||
}>() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<div class="flex space-x-6 text-light-text dark:text-dark-text"> | ||
<div class="p-1 text-3xl rounded-full bg-light-menu dark:bg-dark-menu h-min elem-shadow-sm"> | ||
<Icon icon="fluent:person-24-filled" /> | ||
</div> | ||
<div> | ||
<div class="text-lg">{{ text }}</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue' | ||
defineProps<{ | ||
text: string | ||
}>() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,36 @@ | ||
import './assets/tailwind.css' | ||
|
||
import { createApp } from 'vue' | ||
import { createI18n } from 'vue-i18n' | ||
import App from './App.vue' | ||
import router from './router' | ||
|
||
const i18n = createI18n({ | ||
locale: window.navigator.language, | ||
fallbackLocale: 'de', | ||
messages: { | ||
en: { | ||
'chat-prompt': 'Message ChatGSWiki...', | ||
'check-linked-wiki-pages-notice': | ||
'Please check the linked source to make sure that the information provided is correct.', | ||
'no-response-message': | ||
'Sorry, but no valid response was returned for your question. Please try rephrasing it.', | ||
source: 'Source' | ||
}, | ||
de: { | ||
'chat-prompt': 'Schreib ChatGSWiki...', | ||
'check-linked-wiki-pages-notice': | ||
'Bitte überprüfen Sie die verlinkten Quellen, um sicherzustellen, dass die bereitgestellten Informationen korrekt sind.', | ||
'no-response-message': | ||
'Leider wurde auf Ihre Frage keine gültige Antwort zurückgegeben. Bitte versuchen Sie es umzuformulieren.', | ||
source: 'Quelle' | ||
} | ||
} | ||
}) | ||
|
||
const app = createApp(App) | ||
|
||
app.use(i18n) | ||
app.use(router) | ||
|
||
app.mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import type { Source } from './source.js' | ||
|
||
export interface ResponseObject { | ||
answer: string | ||
sources?: Source[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export type Source = { | ||
id: number | ||
src: string | ||
content: string | ||
score: number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters