feat: export chat

This commit is contained in:
archer
2023-05-02 11:45:10 +08:00
parent 89a67ca9c0
commit b0d414ac12
10 changed files with 951 additions and 15 deletions

View File

@@ -75,7 +75,7 @@ export async function generateQA(next = false): Promise<any> {
role: 'system',
content: `你是出题人
${dataItem.prompt || '下面是"一段长文本"'}
从中选出5至20个题目和答案,题目包含问答题,计算题,代码题等.答案详细.按格式返回: Q1:
从中选出5至20个题目和答案.答案详细.按格式返回: Q1:
A1:
Q2:
A2:

View File

@@ -90,7 +90,7 @@ export const openaiCreateEmbedding = async ({
)
.then((res) => ({
tokenLen: res.data.usage.total_tokens || 0,
vector: res?.data?.data?.[0]?.embedding || []
vector: res.data.data?.[0]?.embedding || []
}));
pushGenerateVectorBill({