mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-24 03:43:43 +08:00
init llm config
This commit is contained in:
@@ -64,4 +64,22 @@ CREATE TABLE mjga.user_position_map (
|
||||
PRIMARY KEY (user_id, position_id),
|
||||
FOREIGN KEY (user_id) REFERENCES mjga.user(id) ON UPDATE NO ACTION ON DELETE RESTRICT,
|
||||
FOREIGN KEY (position_id) REFERENCES mjga.position(id) ON UPDATE NO ACTION ON DELETE RESTRICT
|
||||
);
|
||||
);
|
||||
|
||||
CREATE TYPE "llm_code_enum" AS ENUM (
|
||||
'DEEP_SEEK',
|
||||
'ZHI_PU'
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE mjga.ai_llm_config (
|
||||
id BIGSERIAL NOT NULL UNIQUE,
|
||||
name VARCHAR(255) NOT NULL UNIQUE,
|
||||
code LLM_CODE_ENUM NOT NULL UNIQUE,
|
||||
model_name VARCHAR(255) NOT NULL,
|
||||
api_key VARCHAR(255) NOT NULL,
|
||||
url VARCHAR(255) NOT NULL,
|
||||
enable BOOLEAN NOT NULL DEFAULT true,
|
||||
priority SMALLINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY(id)
|
||||
);
|
||||
|
||||
@@ -27,3 +27,8 @@ VALUES (1, 1),
|
||||
(1, 6),
|
||||
(1, 7),
|
||||
(1, 8);
|
||||
|
||||
INSERT INTO mjga.ai_llm_config (name,code,model_name, api_key, url, enable, priority)
|
||||
VALUES
|
||||
('DeepSeek','DEEP_SEEK','deepseek-chat','', 'https://api.deepseek.com', false, 0),
|
||||
('智谱清言','ZHI_PU','glm-4-flash', '', 'https://open.bigmodel.cn/', false, 1);
|
||||
Reference in New Issue
Block a user