Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
msveshnikov committed Mar 17, 2024
1 parent 06acf72 commit 993b947
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "freechat",
"version": "0.1.0",
"version": "1.0.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.4",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ app.post("/interact", async (req, res) => {
userInput = userInput?.toLowerCase();
let imageResponse;
if (userInput.includes("paint") || userInput.includes("draw") || userInput.includes("generate")) {
imageResponse = await getImageTitan(textResponse.substr(0, 200));
imageResponse = await getImageTitan(textResponse.trim().substr(0, 200));
}

res.json({ textResponse, imageResponse });
res.json({ textResponse: textResponse.trim(), imageResponse });
} catch (error) {
console.error(error);
res.status(500).json({
Expand Down
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function App() {
}, [chatHistory]);

return (
<Container maxWidth="md" style={{ display: "flex", flexDirection: "column", height: "97vh" }}>
<Container maxWidth="md" style={{ display: "flex", flexDirection: "column", height: "95vh" }}>
<Box flex={1} overflow="auto" padding={2} display="flex" flexDirection="column" ref={chatContainerRef}>
{chatHistory.map((chat, index) => (
<Box key={index} display="flex" flexDirection="column" marginBottom={2}>
Expand Down Expand Up @@ -97,7 +97,7 @@ function App() {
}}
/>
<Button variant="contained" color="primary" onClick={handleSubmit} style={{ marginLeft: 8 }}>
Submit
Send
</Button>
</Box>
</Container>
Expand Down

0 comments on commit 993b947

Please sign in to comment.