mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 19:54:11 +00:00
Change embedding (#1463)
* rebuild embedding queue * dataset menu * feat: rebuild data api * feat: ui change embedding model * dataset ui * feat: rebuild index ui * rename collection
This commit is contained in:
38
.vscode/nextapi.code-snippets
vendored
38
.vscode/nextapi.code-snippets
vendored
@@ -10,14 +10,19 @@
|
||||
"scope": "javascript,typescript",
|
||||
"prefix": "nextapi",
|
||||
"body": [
|
||||
"import type { NextApiRequest, NextApiResponse } from 'next';",
|
||||
"import type { ApiRequestProps, ApiResponseType } from '@fastgpt/service/type/next';",
|
||||
"import { NextAPI } from '@/service/middle/entry';",
|
||||
"",
|
||||
"type Props = {};",
|
||||
"export type ${TM_FILENAME_BASE}Query = {};",
|
||||
"",
|
||||
"type Response = {};",
|
||||
"export type ${TM_FILENAME_BASE}Body = {};",
|
||||
"",
|
||||
"async function handler(req: NextApiRequest, res: NextApiResponse<any>): Promise<Response> {",
|
||||
"export type ${TM_FILENAME_BASE}Response = {};",
|
||||
"",
|
||||
"async function handler(",
|
||||
" req: ApiRequestProps<getDatasetTrainingQueueBody, getDatasetTrainingQueueQuery>,",
|
||||
" res: ApiResponseType<any>",
|
||||
"): Promise<getDatasetTrainingQueueResponse> {",
|
||||
" $1",
|
||||
" return {}",
|
||||
"}",
|
||||
@@ -25,5 +30,30 @@
|
||||
"export default NextAPI(handler);"
|
||||
],
|
||||
"description": "FastGPT Next API template"
|
||||
},
|
||||
"use context template": {
|
||||
"scope": "typescriptreact",
|
||||
"prefix": "context",
|
||||
"body": [
|
||||
"import { ReactNode } from 'react';",
|
||||
"import { createContext } from 'use-context-selector';",
|
||||
"",
|
||||
"type ContextType = {$1};",
|
||||
"",
|
||||
"type ContextValueType = {};",
|
||||
"",
|
||||
"export const Context = createContext<ContextType>({});",
|
||||
"",
|
||||
"export const ContextProvider = ({",
|
||||
" children,",
|
||||
" value",
|
||||
"}: {",
|
||||
" children: ReactNode;",
|
||||
" value: ContextValueType;",
|
||||
"}) => {",
|
||||
" return <Context.Provider value={value}>{children}</Context.Provider>;",
|
||||
"};",
|
||||
],
|
||||
"description": "FastGPT usecontext template"
|
||||
}
|
||||
}
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -11,5 +11,6 @@
|
||||
"i18n-ally.sortKeys": true,
|
||||
"i18n-ally.keepFulfilled": false,
|
||||
"i18n-ally.sourceLanguage": "zh", // 根据此语言文件翻译其他语言文件的变量和内容
|
||||
"i18n-ally.displayLanguage": "zh" // 显示语言
|
||||
"i18n-ally.displayLanguage": "zh", // 显示语言
|
||||
"i18n-ally.extract.targetPickingStrategy": "most-similar-by-key"
|
||||
}
|
Reference in New Issue
Block a user