-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add generic api config * Order of location * Prohibit build on PR conditional * Add local dev proxy config * Remove font integrations * Scroll and layout adjustments * Adjust build dist dirs * remove folder dist on build * Add Autogrow for ui input * Add appsettings and toolbar * Adjust appsettings to load onmounted * Support html in disclaimer text * Improve error handling * Update ui/src/api/index.ts Co-authored-by: Bourne93 <[email protected]> --------- Co-authored-by: Bourne93 <[email protected]>
- Loading branch information
Showing
12 changed files
with
177 additions
and
82 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
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 |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import { api } from 'boot/axios'; | ||
import { DeepshoreChatRequest, DeepshoreChatResponse } from 'src/types/chat'; | ||
import { AppSettings } from '../types/appsettings'; | ||
|
||
export async function sendQuestion( | ||
data: DeepshoreChatRequest | ||
): Promise<DeepshoreChatResponse> { | ||
const response = await api.post('http://0.0.0.0:8080/chatbot', data); | ||
try { | ||
const response = await api.post('/chatbot', data); | ||
return response.data; | ||
} catch (e) { | ||
return { 'error': JSON.stringify(e), 'answer': '', 'related_articles': [] } | ||
} | ||
} | ||
|
||
export async function getAppSettings(): Promise<AppSettings> { | ||
const response = await api.get('/appsettings'); | ||
return response.data; | ||
} |
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 |
---|---|---|
@@ -1,18 +1,20 @@ | ||
// app global css in SCSS form | ||
body { | ||
font-family: 'Saira', sans-serif; | ||
} | ||
.chat-div { | ||
font-family: 'Saira', sans-serif; | ||
width: 100%; | ||
max-height: 85vh; | ||
min-height: 50vh; | ||
overflow-x: auto; | ||
padding: 1em !important; | ||
} | ||
|
||
.chat-scroll { | ||
width: 100%; | ||
height: 90%; | ||
max-height: 90%; | ||
} | ||
|
||
.chat-row { | ||
width: 66%; | ||
padding: 1em !important; | ||
} | ||
.chat-input-div { | ||
width: 100%; | ||
height: 10%; | ||
width: 100%; | ||
} |
Oops, something went wrong.