Skip to content

Commit

Permalink
combine chat endpoints, add streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
JKTUNING committed Dec 5, 2024
1 parent 8c53af5 commit 37bdf67
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/api/chat/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function POST(req) {
console.log("Starting stream");
try {
const response = await fetch(
`${process.env.FLUX_API_URL}/chat/completions/stream`,
`${process.env.FLUX_API_URL}/chat/completions`,
{
method: "POST",
headers: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/chat/components/ChatBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ChatBox = ({ setBalanceKey }) => {
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ messages: currentMessage }),
body: JSON.stringify({ messages: currentMessage, stream: true }),
});

if (!response.ok) throw new Error("Network response was not ok");
Expand Down

0 comments on commit 37bdf67

Please sign in to comment.