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