mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-07-04 06:09:19 +00:00
ai返回接口
This commit is contained in:
parent
8805c60e98
commit
45592a1852
29
constants/ai/aiModels.js
Normal file
29
constants/ai/aiModels.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
const aiModels = {
|
||||||
|
openai: {
|
||||||
|
gpt3: 'text-davinci-003',
|
||||||
|
gpt4: 'gpt-4',
|
||||||
|
gpt35_turbo: 'gpt-3.5-turbo',
|
||||||
|
},
|
||||||
|
|
||||||
|
deepseek: {
|
||||||
|
r1: 'deepseek-ai/DeepSeek-R1',
|
||||||
|
v3: 'deepseek-ai/DeepSeek-V3',
|
||||||
|
r1_distill_Qwen_32b: 'deepseek-ai/DeepSeek-R1-Distill-Qwen-32B', //1.26
|
||||||
|
r1_distill_Qwen_14b: 'deepseek-ai/DeepSeek-R1-Distill-Qwen-14B', //0.7
|
||||||
|
},
|
||||||
|
|
||||||
|
THUDM: {
|
||||||
|
GLM4_32b: 'THUDM/GLM-4-32B-0414', // 1.89 tokens
|
||||||
|
GLMZ1_32b: 'THUDM/GLM-Z1-32B-0414', // 4 tokens
|
||||||
|
GLM4_9b: 'THUDM/GLM-4-9B-0414', //free
|
||||||
|
},
|
||||||
|
|
||||||
|
Qwen: {
|
||||||
|
Qwen25VL_32b: 'Qwen/Qwen2.5-VL-32B-Instruct', // 4.13 视觉
|
||||||
|
QwenQ_32b: 'Qwen/QwQ-32B', //4/M tokens
|
||||||
|
Qwen25_72b: 'Qwen/Qwen2.5-72B-Instruct-128K', //4.13
|
||||||
|
QwenQVQ_72b_preview: 'Qwen/QVQ-72B-Preview', //9.9 视觉
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default aiModels;
|
0
constants/ai/prompt/keep.js
Normal file
0
constants/ai/prompt/keep.js
Normal file
28
constants/ai/returnMessages.js
Normal file
28
constants/ai/returnMessages.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
// 规范ai返回形式
|
||||||
|
const returnMessages = [
|
||||||
|
{
|
||||||
|
type: 'message',
|
||||||
|
data: 'Hello, this is a text message.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'image',
|
||||||
|
data: 'test',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'at',
|
||||||
|
data: 114514,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'function',
|
||||||
|
data: '1',
|
||||||
|
extra: {
|
||||||
|
params: {
|
||||||
|
1: '1',
|
||||||
|
2: '2',
|
||||||
|
},
|
||||||
|
callAI: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default returnMessages;
|
2
index.js
2
index.js
@ -1,7 +1,7 @@
|
|||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import Version from './lib/system/version.js';
|
import Version from './lib/system/version.js';
|
||||||
import fc from './components/json.js';
|
import fc from './components/json.js';
|
||||||
import Path from './constants/path/path.js';
|
import Path from './constants/path.js';
|
||||||
import { crystelfInit } from './lib/system/init.js';
|
import { crystelfInit } from './lib/system/init.js';
|
||||||
import updater from './lib/system/updater.js';
|
import updater from './lib/system/updater.js';
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import Path, { defaultConfig } from '../../constants/path/path.js';
|
import Path, { defaultConfig } from '../../constants/path.js';
|
||||||
import fc from '../../components/json.js';
|
import fc from '../../components/json.js';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import relativelyPath from '../../constants/path/relativelyPath.js';
|
import relativelyPath from '../../constants/relativelyPath.js';
|
||||||
|
|
||||||
const configPath = Path.config;
|
const configPath = Path.config;
|
||||||
const configFile = path.join(configPath, 'config.json');
|
const configFile = path.join(configPath, 'config.json');
|
||||||
|
@ -2,7 +2,7 @@ import child_process from 'child_process';
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import Path from '../../constants/path/path.js';
|
import Path from '../../constants/path.js';
|
||||||
|
|
||||||
const GIT_DIR = path.join(Path.root, '.git');
|
const GIT_DIR = path.join(Path.root, '.git');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user