rename openchat branding to chatbot on demo (#1421)
This commit is contained in:
parent
72597d6f68
commit
e7ef7d8f9c
22 changed files with 161 additions and 127 deletions
|
|
@ -145,7 +145,11 @@ function PureMultimodalInput({
|
|||
const [uploadQueue, setUploadQueue] = useState<string[]>([]);
|
||||
|
||||
const submitForm = useCallback(() => {
|
||||
window.history.pushState({}, "", `${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/chat/${chatId}`);
|
||||
window.history.pushState(
|
||||
{},
|
||||
"",
|
||||
`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/chat/${chatId}`
|
||||
);
|
||||
|
||||
sendMessage({
|
||||
role: "user",
|
||||
|
|
@ -188,10 +192,13 @@ function PureMultimodalInput({
|
|||
formData.append("file", file);
|
||||
|
||||
try {
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/files/upload`, {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
});
|
||||
const response = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_BASE_PATH ?? ""}/api/files/upload`,
|
||||
{
|
||||
method: "POST",
|
||||
body: formData,
|
||||
}
|
||||
);
|
||||
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue