mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-03 16:45:17 +03:00
Use status.HTTP_501_NOT_IMPLEMENTED from FastAPI
This commit is contained in:
parent
cd1d28729a
commit
333386ac8b
@ -14,7 +14,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from fastapi import APIRouter, Depends, HTTPException, status
|
||||
|
||||
# Check AI Copilot availability
|
||||
from gns3server.agent import AI_COPILOT_AVAILABLE
|
||||
@ -34,7 +34,7 @@ else:
|
||||
@_llm_router.api_route("/{path:path}", methods=["GET", "POST", "DELETE", "PATCH", "PUT"])
|
||||
async def ai_not_available(path: str = ""):
|
||||
raise HTTPException(
|
||||
status_code=501,
|
||||
status_code=status.HTTP_501_NOT_IMPLEMENTED,
|
||||
detail="AI Copilot is not available. Install AI dependencies with: pip install gns3-server[ai-copilot]"
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user