fix: 修复/analyze接口
This commit is contained in:
@@ -371,8 +371,8 @@ async function testConnection() {
|
||||
const response = await apiService.testApiConnection({
|
||||
api_url: apiConfig.value.apiUrl,
|
||||
api_key: apiConfig.value.apiKey,
|
||||
api_model: apiConfig.value.apiModel,
|
||||
api_timeout: apiConfig.value.apiTimeout
|
||||
api_model: apiConfig.value.apiModel || undefined,
|
||||
api_timeout: parseInt(apiConfig.value.apiTimeout) || 60
|
||||
});
|
||||
|
||||
if (response.success) {
|
||||
|
||||
@@ -617,7 +617,7 @@ async function analyzeStocks() {
|
||||
}
|
||||
|
||||
// 发送分析请求
|
||||
const response = await fetch('/analyze', {
|
||||
const response = await fetch('/api/analyze', {
|
||||
method: 'POST',
|
||||
headers,
|
||||
body: JSON.stringify(requestData)
|
||||
|
||||
@@ -65,14 +65,14 @@ export interface AnalyzeRequest {
|
||||
api_url?: string;
|
||||
api_key?: string;
|
||||
api_model?: string;
|
||||
api_timeout?: string;
|
||||
api_timeout?: number;
|
||||
}
|
||||
|
||||
export interface TestApiRequest {
|
||||
api_url: string;
|
||||
api_key: string;
|
||||
api_model: string;
|
||||
api_timeout: string;
|
||||
api_model?: string;
|
||||
api_timeout: number;
|
||||
}
|
||||
|
||||
export interface TestApiResponse {
|
||||
|
||||
Reference in New Issue
Block a user