Merge branch 'main' into agent-prompt
This commit is contained in:
commit
3d92814476
4 changed files with 17 additions and 3 deletions
|
|
@ -101,6 +101,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "7860:7860"
|
- "7860:7860"
|
||||||
environment:
|
environment:
|
||||||
|
- LANGFLOW_DEACTIVATE_TRACING=true
|
||||||
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
||||||
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
||||||
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
|
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "7860:7860"
|
- "7860:7860"
|
||||||
environment:
|
environment:
|
||||||
|
- LANGFLOW_DEACTIVATE_TRACING=true
|
||||||
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
||||||
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
||||||
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
|
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,10 @@ export function useDoclingHealth() {
|
||||||
const { data: health, isLoading, isError } = useDoclingHealthQuery();
|
const { data: health, isLoading, isError } = useDoclingHealthQuery();
|
||||||
|
|
||||||
const isHealthy = health?.status === "healthy" && !isError;
|
const isHealthy = health?.status === "healthy" && !isError;
|
||||||
const isUnhealthy = health?.status === "unhealthy" || isError;
|
// Only consider unhealthy if backend is up but docling is down
|
||||||
|
// Don't show banner if backend is unavailable
|
||||||
|
const isUnhealthy = health?.status === "unhealthy";
|
||||||
|
const isBackendUnavailable = health?.status === "backend-unavailable" || isError;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
health,
|
health,
|
||||||
|
|
@ -104,6 +107,7 @@ export function useDoclingHealth() {
|
||||||
isError,
|
isError,
|
||||||
isHealthy,
|
isHealthy,
|
||||||
isUnhealthy,
|
isUnhealthy,
|
||||||
|
isBackendUnavailable,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import {
|
||||||
} from "@tanstack/react-query";
|
} from "@tanstack/react-query";
|
||||||
|
|
||||||
export interface DoclingHealthResponse {
|
export interface DoclingHealthResponse {
|
||||||
status: "healthy" | "unhealthy";
|
status: "healthy" | "unhealthy" | "backend-unavailable";
|
||||||
message?: string;
|
message?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,15 +26,23 @@ export const useDoclingHealthQuery = (
|
||||||
|
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return { status: "healthy" };
|
return { status: "healthy" };
|
||||||
|
} else if (response.status === 503) {
|
||||||
|
// Backend is up but docling is down (backend returns 503 for docling issues)
|
||||||
|
return {
|
||||||
|
status: "unhealthy",
|
||||||
|
message: `Health check failed with status: ${response.status}`,
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
|
// Other backend errors - treat as docling unhealthy
|
||||||
return {
|
return {
|
||||||
status: "unhealthy",
|
status: "unhealthy",
|
||||||
message: `Health check failed with status: ${response.status}`,
|
message: `Health check failed with status: ${response.status}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// Network error - backend is likely down, don't show docling banner
|
||||||
return {
|
return {
|
||||||
status: "unhealthy",
|
status: "backend-unavailable",
|
||||||
message: error instanceof Error ? error.message : "Connection failed",
|
message: error instanceof Error ? error.message : "Connection failed",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue