You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all-- I'm trying to use the --server flag in the terminal and it looks like it creates the Uvicorn server successfully, but whenever I try and send a command to it, I get a "404 not found" error. If I go to the 0.0.0.0:8000 in the browser I get a "page cannot be found" as well.
This is the code I am using to send the request to 0:0:0:0:8000 (React JS app):
let handleButtonClick = async () => {
const response = await fetch('http://localhost:8000/', {
method: 'POST',
mode: 'no-cors',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ type: "websocket.receive", text: "open microsoft paint" }),
});
if (response.ok) {
const eventSource = new EventSource(response.url);
eventSource.onmessage = function (event) {
setResponses((prevResponses) => [...prevResponses, event.data]);
};
eventSource.onerror = function () {
console.error("EventSource failed.");
eventSource.close();
};
} else {
console.error("Failed to send message");
}
}
The server is definitely getting hit, because the terminal is logging the 404 not found error every time I send a request.
I noticed there isn't any documentation around using the --server flag, maybe it's not officially supported? Any help on this would be much appreciated.
Describe the bug
Hey all-- I'm trying to use the --server flag in the terminal and it looks like it creates the Uvicorn server successfully, but whenever I try and send a command to it, I get a "404 not found" error. If I go to the 0.0.0.0:8000 in the browser I get a "page cannot be found" as well.
This is the code I am using to send the request to 0:0:0:0:8000 (React JS app):
The server is definitely getting hit, because the terminal is logging the 404 not found error every time I send a request.
I noticed there isn't any documentation around using the --server flag, maybe it's not officially supported? Any help on this would be much appreciated.
Reproduce
Expected behavior
When I send a POST request to the server, I'd expect a 200 success code and OI to start running my request.
Screenshots
No response
Open Interpreter version
0.3.4
Python version
3.10.11
Operating System name and version
Windows 11
Additional context
No response
The text was updated successfully, but these errors were encountered: