mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
4.8.23 dev (#3917)
* fix: icon refresh * fix: aiproxy http request * fix: collection list count * fix: collection list count * fix: tts selector name * update action
This commit is contained in:
@@ -42,7 +42,7 @@ const TTSSelect = ({
|
||||
label: (
|
||||
<HStack>
|
||||
<Avatar borderRadius={'0'} w={'1.25rem'} src={providerData.avatar} />
|
||||
<Box>{t(providerData.name)}</Box>
|
||||
<Box>{t(model.name as any)}</Box>
|
||||
</HStack>
|
||||
),
|
||||
value: model.model,
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { jsonRes } from '@fastgpt/service/common/response';
|
||||
import { request } from 'https';
|
||||
import { request as httpsRequest } from 'https';
|
||||
import { request as httpRequest } from 'http';
|
||||
import { authSystemAdmin } from '@fastgpt/service/support/permission/user/auth';
|
||||
|
||||
const baseUrl = process.env.AIPROXY_API_ENDPOINT;
|
||||
@@ -30,7 +31,10 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
delete req.headers?.host;
|
||||
delete req.headers?.origin;
|
||||
|
||||
const requestResult = request({
|
||||
// Select request function based on protocol
|
||||
const requestFn = parsedUrl.protocol === 'https:' ? httpsRequest : httpRequest;
|
||||
|
||||
const requestResult = requestFn({
|
||||
protocol: parsedUrl.protocol,
|
||||
hostname: parsedUrl.hostname,
|
||||
port: parsedUrl.port,
|
||||
|
@@ -14,6 +14,7 @@ import { PaginationResponse } from '@fastgpt/web/common/fetch/type';
|
||||
import { parsePaginationRequest } from '@fastgpt/service/common/api/pagination';
|
||||
import { DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type';
|
||||
import { MongoDatasetData } from '@fastgpt/service/core/dataset/data/schema';
|
||||
import { MongoDatasetTraining } from '@fastgpt/service/core/dataset/training/schema';
|
||||
|
||||
async function handler(
|
||||
req: NextApiRequest
|
||||
@@ -115,7 +116,7 @@ async function handler(
|
||||
{ _id: string; count: number }[],
|
||||
{ _id: string; count: number }[]
|
||||
] = await Promise.all([
|
||||
MongoDatasetCollection.aggregate(
|
||||
MongoDatasetTraining.aggregate(
|
||||
[
|
||||
{
|
||||
$match: {
|
||||
|
Reference in New Issue
Block a user