forked from eosphoros-ai/DB-GPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
author penghou.ho <penghou.ho@techronex.com> 1701341533 +0800 committer penghou.ho <penghou.ho@techronex.com> 1707199703 +0800 parent 3f70da4 author penghou.ho <penghou.ho@techronex.com> 1701341533 +0800 committer penghou.ho <penghou.ho@techronex.com> 1707198697 +0800 parent 3f70da4 author penghou.ho <penghou.ho@techronex.com> 1701341533 +0800 committer penghou.ho <penghou.ho@techronex.com> 1707198521 +0800 Add requirements.txt Create only necesasary tables Remove reference info in chat completion result Set disable_alembic_upgrade to True Comment _initialize_awel Comment mount_static_files Fix torch.has_mps deprecated Add API key Comment unused API endpoints Install rocksdict to enable DiskCacheStorage Fix the chat_knowledge missing in chat_mode Update requirements.txt Re-enable awel and add api key check for simple_rag_example DAG Merge main bdf9442 Disable disable_alembic_upgrade Compile bitsandbytes from source and enable verbose Tune the prompt of chat knowledge to only refer to context Add the web static files and uncomment previous unused APIs Add back routers Enable KNOWLEDGE_CHAT_SHOW_RELATIONS Display relation based on CFG.KNOWLEDGE_CHAT_SHOW_RELATIONS Stop reference add to last_output if KNOWLEDGE_CHAT_SHOW_RELATIONS is false Fix always no reference Improve chinese prompts Update requirements.txt Improve prompt Improve prompt Fix prompt variable name Use openhermes-2.5-mistral-7b.Q4_K_M.gguf 1. Fix the delete issue of LlamaCppModel 2. Disable verbose log 3. Update diskcache 4. Remove conda-pack Update chinese prompt and process the model response Extract result from varying tags Add back missing content_matches and put tags regex into variable Update english prompt and decide CANNOT_ANSWER based on language configuration Add 3 new models entries and upgrade bitsandbytes Add few chat templates Update model conversation with fastchat code Revert "Update model conversation with fastchat code" This reverts commit a5dc4b5. Revert "Add few chat templates" This reverts commit e6b6c99. Add OpenHermes-2.5-Mistral-7B chat template Fix missing messages and offset in chat template Update fschat Remove model adapter debugging logs and added conversation template Update chinese chat knowledge prompt Avoid to save the long chat history messages Update chinese chat knowledge prompt Temporary workaround to make the GGUF file use different chat template Use ADD_COLON_SINGLE instead of FALCON_CHAT for separator style Allow no model_name in chat completion request Use starling-lm-7b-alpha.Q5_K_M.gguf Add empty string as system for openchat_3.5 chat template Undo response regex in generate_streaming refactor: Refactor storage and new serve template (eosphoros-ai#947) feat(core): Add API authentication for serve template (eosphoros-ai#950) ci: Add python unit test workflows (eosphoros-ai#954) feat(model): Support Mixtral-8x7B (eosphoros-ai#959) feat(core): Support multi round conversation operator (eosphoros-ai#986) chore(build): Fix typo and new pre-commit config (eosphoros-ai#987) feat(model): Support SOLAR-10.7B-Instruct-v1.0 (eosphoros-ai#1001) refactor: RAG Refactor (eosphoros-ai#985) Co-authored-by: Aralhi <xiaoping0501@gmail.com> Co-authored-by: csunny <cfqsunny@163.com> Upgrade english prompt for chat knowledge
- Loading branch information
penghou.ho
committed
Feb 6, 2024
1 parent
3f70da4
commit b130d7c
Showing
68 changed files
with
1,143 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
-- Create only necesasary tables | ||
CREATE DATABASE IF NOT EXISTS dbvicuna; | ||
use dbvicuna; | ||
|
||
-- For alembic migration tool | ||
CREATE TABLE `alembic_version` ( | ||
version_num VARCHAR(32) NOT NULL, | ||
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num) | ||
); | ||
|
||
CREATE TABLE `knowledge_space` ( | ||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'auto increment id', | ||
`name` varchar(100) NOT NULL COMMENT 'knowledge space name', | ||
`vector_type` varchar(50) NOT NULL COMMENT 'vector type', | ||
`desc` varchar(500) NOT NULL COMMENT 'description', | ||
`owner` varchar(100) DEFAULT NULL COMMENT 'owner', | ||
`context` TEXT DEFAULT NULL COMMENT 'context argument', | ||
`gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'created time', | ||
`gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', | ||
PRIMARY KEY (`id`), | ||
KEY `idx_name` (`name`) COMMENT 'index:idx_name' | ||
) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='knowledge space table'; | ||
|
||
CREATE TABLE `knowledge_document` ( | ||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'auto increment id', | ||
`doc_name` varchar(100) NOT NULL COMMENT 'document path name', | ||
`doc_type` varchar(50) NOT NULL COMMENT 'doc type', | ||
`space` varchar(50) NOT NULL COMMENT 'knowledge space', | ||
`chunk_size` int NOT NULL COMMENT 'chunk size', | ||
`last_sync` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'last sync time', | ||
`status` varchar(50) NOT NULL COMMENT 'status TODO,RUNNING,FAILED,FINISHED', | ||
`content` LONGTEXT NOT NULL COMMENT 'knowledge embedding sync result', | ||
`result` TEXT NULL COMMENT 'knowledge content', | ||
`vector_ids` LONGTEXT NULL COMMENT 'vector_ids', | ||
`summary` LONGTEXT NULL COMMENT 'knowledge summary', | ||
`gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'created time', | ||
`gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', | ||
PRIMARY KEY (`id`), | ||
KEY `idx_doc_name` (`doc_name`) COMMENT 'index:idx_doc_name' | ||
) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='knowledge document table'; | ||
|
||
CREATE TABLE `document_chunk` ( | ||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'auto increment id', | ||
`doc_name` varchar(100) NOT NULL COMMENT 'document path name', | ||
`doc_type` varchar(50) NOT NULL COMMENT 'doc type', | ||
`document_id` int NOT NULL COMMENT 'document parent id', | ||
`content` longtext NOT NULL COMMENT 'chunk content', | ||
`meta_info` varchar(200) NOT NULL COMMENT 'metadata info', | ||
`gmt_created` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created time', | ||
`gmt_modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', | ||
PRIMARY KEY (`id`), | ||
KEY `idx_document_id` (`document_id`) COMMENT 'index:document_id' | ||
) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='knowledge document chunk detail'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.