mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 08:55:23 +00:00
feat: 处理 openai 格式请求
This commit is contained in:
@@ -977,7 +977,7 @@ async function generateContent(client, requestData, userPromptId, projectId = nu
|
||||
sessionId
|
||||
});
|
||||
|
||||
const response = await axios({
|
||||
const axiosConfig = {
|
||||
url: `${CODE_ASSIST_ENDPOINT}/${CODE_ASSIST_API_VERSION}:generateContent`,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -986,7 +986,9 @@ async function generateContent(client, requestData, userPromptId, projectId = nu
|
||||
},
|
||||
data: request,
|
||||
timeout: 60000, // 生成内容可能需要更长时间
|
||||
});
|
||||
};
|
||||
|
||||
const response = await axios(axiosConfig);
|
||||
|
||||
logger.info('✅ generateContent API调用成功');
|
||||
return response.data;
|
||||
|
||||
Reference in New Issue
Block a user