This commit is contained in:
parent
7300ae8b50
commit
aef7b5942d
|
|
@ -35,9 +35,9 @@ const formSchema = z.object({
|
|||
ticker: z.string().min(1, "股票代碼為必填").max(10),
|
||||
analysis_date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "日期格式必須為 YYYY-MM-DD"),
|
||||
analysts: z.array(z.string()).min(1, "請至少選擇一位分析師"),
|
||||
research_depth: z.number().min(1).max(5),
|
||||
deep_think_llm: z.string(),
|
||||
quick_think_llm: z.string(),
|
||||
research_depth: z.number().int().min(1).max(5),
|
||||
shallow_thinking_agent: z.string().min(1, "請選擇快速思維模型"),
|
||||
deep_thinking_agent: z.string().min(1, "請選擇深層思維模型"),
|
||||
|
||||
// API Configuration
|
||||
openai_api_key: z.string().min(20, "請輸入有效的 OpenAI API Key"),
|
||||
|
|
@ -64,9 +64,9 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) {
|
|||
ticker: "NVDA",
|
||||
analysis_date: format(new Date(), "yyyy-MM-dd"),
|
||||
analysts: ["market", "social", "news", "fundamentals"], // 預設全選
|
||||
research_depth: 1,
|
||||
deep_think_llm: "gpt-4o-mini",
|
||||
quick_think_llm: "gpt-4o-mini",
|
||||
research_depth: 3, // 預設中等層級
|
||||
shallow_thinking_agent: "gpt-4o-mini",
|
||||
deep_thinking_agent: "gpt-4o",
|
||||
openai_api_key: "",
|
||||
openai_base_url: "https://api.openai.com/v1",
|
||||
alpha_vantage_api_key: "",
|
||||
|
|
@ -161,6 +161,36 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) {
|
|||
/>
|
||||
</div>
|
||||
|
||||
{/* 研究深度 */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="research_depth"
|
||||
render={({ field }) => (
|
||||
<FormItem className="md:col-span-2">
|
||||
<FormLabel>研究深度</FormLabel>
|
||||
<Select
|
||||
onValueChange={(value) => field.onChange(parseInt(value))}
|
||||
defaultValue={field.value.toString()}
|
||||
>
|
||||
<FormControl>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="選擇研究深度" />
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent>
|
||||
<SelectItem value="1">淺層 - 快速研究,較少的譯論和策略討論</SelectItem>
|
||||
<SelectItem value="3">中等 - 中等程度,適度的譯論和策略討論</SelectItem>
|
||||
<SelectItem value="5">深層 - 全面研究,深入的譯論和策略討論</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<FormDescription>
|
||||
選擇分析的深度和完整性
|
||||
</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="ticker"
|
||||
|
|
@ -226,12 +256,13 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) {
|
|||
)}
|
||||
/>
|
||||
|
||||
{/* 深層思維模型 */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="deep_think_llm"
|
||||
name="deep_thinking_agent"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>深度思考模型</FormLabel>
|
||||
<FormLabel>深層思維模型</FormLabel>
|
||||
<Select onValueChange={field.onChange} defaultValue={field.value}>
|
||||
<FormControl>
|
||||
<SelectTrigger>
|
||||
|
|
@ -255,6 +286,37 @@ export function AnalysisForm({ onSubmit, loading = false }: AnalysisFormProps) {
|
|||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
{/* 快速思維模型 */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="shallow_thinking_agent"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>快速思維模型</FormLabel>
|
||||
<Select onValueChange={field.onChange} defaultValue={field.value}>
|
||||
<FormControl>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="選擇模型" />
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent>
|
||||
<SelectItem value="gpt-5.1-2025-11-13">GPT-5.1</SelectItem>
|
||||
<SelectItem value="gpt-5-mini-2025-08-07">GPT-5 Mini</SelectItem>
|
||||
<SelectItem value="gpt-5-nano-2025-08-07">GPT-5 Nano</SelectItem>
|
||||
<SelectItem value="gpt-4.1-mini">GPT-4.1 Mini</SelectItem>
|
||||
<SelectItem value="gpt-4.1-nano">GPT-4.1 Nano</SelectItem>
|
||||
<SelectItem value="gpt-4o">GPT-4o</SelectItem>
|
||||
<SelectItem value="gpt-4o-mini">GPT-4o Mini</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<FormDescription>
|
||||
用於快速回應的模型
|
||||
</FormDescription>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* API Configuration Section */}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ export interface AnalysisRequest {
|
|||
analysis_date: string;
|
||||
analysts?: string[];
|
||||
research_depth?: number;
|
||||
deep_think_llm?: string;
|
||||
quick_think_llm?: string;
|
||||
shallow_thinking_agent?: string;
|
||||
deep_thinking_agent?: string;
|
||||
|
||||
// API Configuration
|
||||
openai_api_key: string;
|
||||
|
|
|
|||
Loading…
Reference in New Issue