Spaces:
Running
Running
Commit
·
6d10fd4
1
Parent(s):
7bc750c
add
Browse files
frontend/src/components/shared/modals/MethodSelectionModal.tsx
CHANGED
|
@@ -42,7 +42,7 @@ export function MethodSelectionModal({
|
|
| 42 |
isLoading = false,
|
| 43 |
selectedSplitter,
|
| 44 |
}: MethodSelectionModalProps) {
|
| 45 |
-
const [selectedMethod, setSelectedMethod] = useState<string>("
|
| 46 |
const [methods, setMethods] = useState<MethodOption[]>([]);
|
| 47 |
const [loadingMethods, setLoadingMethods] = useState(false);
|
| 48 |
|
|
@@ -61,27 +61,23 @@ export function MethodSelectionModal({
|
|
| 61 |
([id, method]: [string, any]) => ({
|
| 62 |
id,
|
| 63 |
...method,
|
| 64 |
-
recommended: id === "
|
| 65 |
})
|
| 66 |
);
|
| 67 |
setMethods(methodList);
|
| 68 |
} catch (error) {
|
| 69 |
console.error("Failed to fetch methods:", error);
|
| 70 |
-
// Fallback to default
|
| 71 |
setMethods([
|
| 72 |
{
|
| 73 |
-
id: "
|
| 74 |
-
name: "
|
| 75 |
description:
|
| 76 |
-
"
|
| 77 |
method_type: "production",
|
| 78 |
schema_type: "reference_based",
|
| 79 |
-
supported_features: [
|
| 80 |
-
|
| 81 |
-
"line_numbers",
|
| 82 |
-
"failure_detection",
|
| 83 |
-
],
|
| 84 |
-
processing_type: "async_crew",
|
| 85 |
recommended: true,
|
| 86 |
},
|
| 87 |
]);
|
|
@@ -91,7 +87,7 @@ export function MethodSelectionModal({
|
|
| 91 |
};
|
| 92 |
|
| 93 |
const handleConfirm = () => {
|
| 94 |
-
const finalMethodName = selectedMethod || "
|
| 95 |
console.log("MethodSelectionModal: selectedMethod state:", selectedMethod);
|
| 96 |
console.log("MethodSelectionModal: finalMethodName:", finalMethodName);
|
| 97 |
console.log(
|
|
|
|
| 42 |
isLoading = false,
|
| 43 |
selectedSplitter,
|
| 44 |
}: MethodSelectionModalProps) {
|
| 45 |
+
const [selectedMethod, setSelectedMethod] = useState<string>("openai_structured");
|
| 46 |
const [methods, setMethods] = useState<MethodOption[]>([]);
|
| 47 |
const [loadingMethods, setLoadingMethods] = useState(false);
|
| 48 |
|
|
|
|
| 61 |
([id, method]: [string, any]) => ({
|
| 62 |
id,
|
| 63 |
...method,
|
| 64 |
+
recommended: id === "openai_structured",
|
| 65 |
})
|
| 66 |
);
|
| 67 |
setMethods(methodList);
|
| 68 |
} catch (error) {
|
| 69 |
console.error("Failed to fetch methods:", error);
|
| 70 |
+
// Fallback to default method
|
| 71 |
setMethods([
|
| 72 |
{
|
| 73 |
+
id: "openai_structured",
|
| 74 |
+
name: "OpenAI Structured Outputs",
|
| 75 |
description:
|
| 76 |
+
"Simple OpenAI structured outputs extractor using Pydantic models",
|
| 77 |
method_type: "production",
|
| 78 |
schema_type: "reference_based",
|
| 79 |
+
supported_features: ["structured_outputs", "direct_extraction"],
|
| 80 |
+
processing_type: "direct_call",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
recommended: true,
|
| 82 |
},
|
| 83 |
]);
|
|
|
|
| 87 |
};
|
| 88 |
|
| 89 |
const handleConfirm = () => {
|
| 90 |
+
const finalMethodName = selectedMethod || "openai_structured";
|
| 91 |
console.log("MethodSelectionModal: selectedMethod state:", selectedMethod);
|
| 92 |
console.log("MethodSelectionModal: finalMethodName:", finalMethodName);
|
| 93 |
console.log(
|