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
Description:
Can there be a feature where the application automatically detects a backend service running on Ollama defaults settings and periodically checks the status of the Ollama server using the /api/tags endpoint, as a server status mechanism, so that we can be informed if the server becomes unresponsive or encounters an error. This will enhance the user experience by providing real-time feedback on the server's status.
I dont know TypeScript that well, however see below,
Suggested Implementation:
importaxiosfrom'axios';constOLLAMA_BASE_URL='http://localhost:11434';const[serverStatus,setServerStatus]=useState<'online'|'offline'|'error'|'unknown'>('unknown');useEffect(()=>{constcheckServerStatus=async()=>{try{constresponse=awaitaxios.get(`${OLLAMA_BASE_URL}/api/tags`);if(response.data&&Array.isArray(response.data.models)){setServerStatus('online');}else{setServerStatus('error');// Response is not in the expected format}}catch(error){setServerStatus('offline');// Network error or server is down}};// Initially check the status when the component mountscheckServerStatus();// Set up the interval to check server status periodicallyconstintervalId=setInterval(checkServerStatus,10000);// Check every 10 seconds// Clean up the interval when the component unmountsreturn()=>clearInterval(intervalId);},[]);// The serverStatus state can be used in a status bar to indicate connectivity with the backend
Additional Context:
The status check will provide better user feedback and enhance the overall UX of the application.
Consider adding more robust error handling and optimizing the polling frequency based on the application's requirements.
EDIT:
After going through the README, I noticed the following claims:
Auto check if ollama is running ⏰: This is in line with our original issue regarding checking the status of the Ollama server. Has this been implemented but not released yet, because I dont see it on my latest release, or at least cant figure it out, how is the behavior implemented or what should I be looking at?
Detech which models are available to use 📋: Again, this seems to be related to the /api/tags endpoint. It would be great if we could get a brief overview of how it's been implemented.
For both these features, if they are in the pipeline and not released yet, can we expect them in the next release? And if they have been implemented, it would be helpful to understand their behavior.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Description:
Can there be a feature where the application automatically detects a backend service running on Ollama defaults settings and periodically checks the status of the Ollama server using the
/api/tags
endpoint, as a server status mechanism, so that we can be informed if the server becomes unresponsive or encounters an error. This will enhance the user experience by providing real-time feedback on the server's status.I dont know TypeScript that well, however see below,
Suggested Implementation:
Additional Context:
EDIT:
After going through the README, I noticed the following claims:
Auto check if ollama is running ⏰: This is in line with our original issue regarding checking the status of the Ollama server. Has this been implemented but not released yet, because I dont see it on my latest release, or at least cant figure it out, how is the behavior implemented or what should I be looking at?
Detech which models are available to use 📋: Again, this seems to be related to the
/api/tags
endpoint. It would be great if we could get a brief overview of how it's been implemented.For both these features, if they are in the pipeline and not released yet, can we expect them in the next release? And if they have been implemented, it would be helpful to understand their behavior.
Thanks in advance.
The text was updated successfully, but these errors were encountered: