wu981526092 commited on
Commit
6d10fd4
·
1 Parent(s): 7bc750c
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>("production");
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 === "production",
65
  })
66
  );
67
  setMethods(methodList);
68
  } catch (error) {
69
  console.error("Failed to fetch methods:", error);
70
- // Fallback to default production method
71
  setMethods([
72
  {
73
- id: "production",
74
- name: "Multi-Agent Knowledge Extractor",
75
  description:
76
- "Production CrewAI-based multi-agent system with content reference resolution",
77
  method_type: "production",
78
  schema_type: "reference_based",
79
- supported_features: [
80
- "content_references",
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 || "production";
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(