|
|
@ -4,9 +4,6 @@ import ConversationFrontend from '../components/ConversationFrontend';
|
|
|
|
import InputFrontend from "../components/InputFrontend";
|
|
|
|
import InputFrontend from "../components/InputFrontend";
|
|
|
|
import { sendToVoiceRecognition } from "./voice_backend"
|
|
|
|
import { sendToVoiceRecognition } from "./voice_backend"
|
|
|
|
import axios from "axios";
|
|
|
|
import axios from "axios";
|
|
|
|
import { resolve } from "path";
|
|
|
|
|
|
|
|
import { FFmpeg } from "@ffmpeg/ffmpeg";
|
|
|
|
|
|
|
|
import { fetchFile, toBlobURL } from "@ffmpeg/util"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const InputOutputBackend: React.FC = () => {
|
|
|
|
const InputOutputBackend: React.FC = () => {
|
|
|
|
// # variables
|
|
|
|
// # variables
|
|
|
@ -50,10 +47,8 @@ const InputOutputBackend: React.FC = () => {
|
|
|
|
The currency is ${preferredCurrency}.
|
|
|
|
The currency is ${preferredCurrency}.
|
|
|
|
Communicate in the language specified by the user (country code: ${preferredLanguage}), and only in this language.
|
|
|
|
Communicate in the language specified by the user (country code: ${preferredLanguage}), and only in this language.
|
|
|
|
You are only able to change language if the user specifically states you must.
|
|
|
|
You are only able to change language if the user specifically states you must.
|
|
|
|
Do not answer in multiple languages or multiple measurement systems under any circumstances other than the user requesting it.
|
|
|
|
Do not answer in multiple languages or multiple measurement systems under any circumstances other than the user requesting it.`
|
|
|
|
You try to use html tags as often as possible in your responses. For images, links and tables you use markdown.`
|
|
|
|
: `You are a helpful assistant`;
|
|
|
|
: `You are a helpful assistant
|
|
|
|
|
|
|
|
You try to use html tags as often as possible in your responses. For images, links and tables you use markdown. You cannot use both at the same time.`;
|
|
|
|
|
|
|
|
setMessages([
|
|
|
|
setMessages([
|
|
|
|
{ role: "system", content: systemMessage },
|
|
|
|
{ role: "system", content: systemMessage },
|
|
|
|
{ role: "assistant", content: "Hello! How may I help you?" },
|
|
|
|
{ role: "assistant", content: "Hello! How may I help you?" },
|
|
|
|