Skip to content

Commit

Permalink
Merge branch 'main' into fixfix-unit
Browse files Browse the repository at this point in the history
  • Loading branch information
gitworkflows authored Dec 27, 2024
2 parents 826b60a + a9b1468 commit 4b7a18e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 18 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# GPT-DB: AI Native Data App Development framework with AWEL(Agentic Workflow Expression Language) and Agents

<p align="left">
<img src="./assets/LOGO.png" width="100%" />
</p>
# GPT-DB: AI Native Data App Development framework with AWEL

<div align="center">
<p>
Expand Down
10 changes: 5 additions & 5 deletions assets/schema/gptdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ CREATE TABLE `gpts_app_collection` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`app_code` varchar(255) NOT NULL COMMENT 'Current AI assistant code',
`user_code` int(11) NOT NULL COMMENT 'user code',
`sys_code` varchar(255) NOT NULL COMMENT 'system app code',
`sys_code` varchar(255) NULL COMMENT 'system app code',
`created_at` datetime DEFAULT NULL COMMENT 'create time',
`updated_at` datetime DEFAULT NULL COMMENT 'last update time',
PRIMARY KEY (`id`),
Expand Down Expand Up @@ -439,10 +439,10 @@ CREATE TABLE `recommend_question` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
`gmt_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last update time',
`app_code` varchar(255) DEFAULT NULL COMMENT 'Current AI assistant code',
`app_code` varchar(255) NOT NULL COMMENT 'Current AI assistant code',
`question` text DEFAULT NULL COMMENT 'question',
`user_code` int(11) NOT NULL COMMENT 'user code',
`sys_code` varchar(255) NOT NULL COMMENT 'system app code',
`sys_code` varchar(255) NULL COMMENT 'system app code',
`valid` varchar(10) DEFAULT 'true' COMMENT 'is it effective,true/false',
`chat_mode` varchar(255) DEFAULT NULL COMMENT 'Conversation scene mode,chat_knowledge...',
`params` text DEFAULT NULL COMMENT 'question param',
Expand All @@ -456,7 +456,7 @@ CREATE TABLE `user_recent_apps` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
`gmt_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last update time',
`app_code` varchar(255) DEFAULT NULL COMMENT 'AI assistant code',
`app_code` varchar(255) NOT NULL COMMENT 'AI assistant code',
`last_accessed` timestamp NULL DEFAULT NULL COMMENT 'User recent usage time',
`user_code` varchar(255) DEFAULT NULL COMMENT 'user code',
`sys_code` varchar(255) DEFAULT NULL COMMENT 'system app code',
Expand Down Expand Up @@ -558,4 +558,4 @@ VALUES ('user_18', 'password_18', '[email protected]', '12345678908');
INSERT INTO users (username, password, email, phone)
VALUES ('user_19', 'password_19', '[email protected]', '12345678909');
INSERT INTO users (username, password, email, phone)
VALUES ('user_20', 'password_20', '[email protected]', '12345678900');
VALUES ('user_20', 'password_20', '[email protected]', '12345678900');
6 changes: 3 additions & 3 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7019,9 +7019,9 @@ multicast-dns@^7.2.5:
thunky "^1.0.2"

nanoid@^3.3.7:
version "3.3.7"
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz"
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
version "3.3.8"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf"
integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==

[email protected]:
version "0.6.3"
Expand Down
26 changes: 24 additions & 2 deletions gptdb/model/proxy/llms/spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,37 @@ def __init__(
context_length: Optional[int] = 4096,
executor: Optional[Executor] = None,
):
"""
Tips: 星火大模型API当前有Lite、Pro、Pro-128K、Max、Max-32K和4.0 Ultra六个版本,各版本独立计量tokens。
传输协议 :ws(s),为提高安全性,强烈推荐wss
Spark4.0 Ultra 请求地址,对应的domain参数为4.0Ultra:
wss://spark-api.xf-yun.com/v4.0/chat
Spark Max-32K请求地址,对应的domain参数为max-32k
wss://spark-api.xf-yun.com/chat/max-32k
Spark Max请求地址,对应的domain参数为generalv3.5
wss://spark-api.xf-yun.com/v3.5/chat
Spark Pro-128K请求地址,对应的domain参数为pro-128k:
wss://spark-api.xf-yun.com/chat/pro-128k
Spark Pro请求地址,对应的domain参数为generalv3:
wss://spark-api.xf-yun.com/v3.1/chat
Spark Lite请求地址,对应的domain参数为lite:
wss://spark-api.xf-yun.com/v1.1/chat
"""
if not model_version:
model_version = model or os.getenv("XUNFEI_SPARK_API_VERSION")
if not api_base:
if model_version == SPARK_DEFAULT_API_VERSION:
api_base = "ws://spark-api.xf-yun.com/v3.1/chat"
domain = "generalv3"
elif model_version == "v4.0":
api_base = "ws://spark-api.xf-yun.com/v4.0/chat"
domain = "4.0Ultra"
elif model_version == "v3.5":
api_base = "ws://spark-api.xf-yun.com/v3.5/chat"
domain = "generalv3.5"
else:
api_base = "ws://spark-api.xf-yun.com/v2.1/chat"
domain = "generalv2"
api_base = "ws://spark-api.xf-yun.com/v1.1/chat"
domain = "lite"
if not api_domain:
api_domain = domain
self._model = model
Expand Down
1 change: 1 addition & 0 deletions web/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
API_BASE_URL=http://127.0.0.1:5670

0 comments on commit 4b7a18e

Please sign in to comment.