feat: pg half vector (#6201)

This commit is contained in:
Archer
2026-01-06 16:47:55 +08:00
committed by GitHub
parent 6ad4b00b2a
commit 573f3544e7
11 changed files with 117 additions and 88 deletions
@@ -5,3 +5,22 @@ export const PG_ADDRESS = process.env.PG_URL;
export const OCEANBASE_ADDRESS = process.env.OCEANBASE_URL; export const OCEANBASE_ADDRESS = process.env.OCEANBASE_URL;
export const MILVUS_ADDRESS = process.env.MILVUS_ADDRESS; export const MILVUS_ADDRESS = process.env.MILVUS_ADDRESS;
export const MILVUS_TOKEN = process.env.MILVUS_TOKEN; export const MILVUS_TOKEN = process.env.MILVUS_TOKEN;
export const VectorVQ = (() => {
if (process.env.VECTOR_VQ_LEVEL === '32') {
return 32;
}
if (process.env.VECTOR_VQ_LEVEL === '16') {
return 16;
}
if (process.env.VECTOR_VQ_LEVEL === '8') {
return 8;
}
if (process.env.VECTOR_VQ_LEVEL === '4') {
return 4;
}
if (process.env.VECTOR_VQ_LEVEL === '2') {
return 2;
}
return 32;
})();
+5 -3
View File
@@ -1,5 +1,5 @@
/* pg vector crud */ /* pg vector crud */
import { DatasetVectorTableName } from '../constants'; import { DatasetVectorTableName, VectorVQ } from '../constants';
import { PgClient, connectPg } from './controller'; import { PgClient, connectPg } from './controller';
import { type PgSearchRawType } from '@fastgpt/global/core/dataset/api'; import { type PgSearchRawType } from '@fastgpt/global/core/dataset/api';
import type { VectorControllerType } from '../type'; import type { VectorControllerType } from '../type';
@@ -9,13 +9,15 @@ import { addLog } from '../../system/log';
export class PgVectorCtrl implements VectorControllerType { export class PgVectorCtrl implements VectorControllerType {
constructor() {} constructor() {}
init = async () => { init = async () => {
const isHalfVec = VectorVQ === 16;
try { try {
await connectPg(); await connectPg();
await PgClient.query(` await PgClient.query(`
CREATE EXTENSION IF NOT EXISTS vector; CREATE EXTENSION IF NOT EXISTS vector;
CREATE TABLE IF NOT EXISTS ${DatasetVectorTableName} ( CREATE TABLE IF NOT EXISTS ${DatasetVectorTableName} (
id BIGSERIAL PRIMARY KEY, id BIGSERIAL PRIMARY KEY,
vector VECTOR(1536) NOT NULL, vector ${isHalfVec ? 'HALFVEC(1536)' : 'VECTOR(1536)'} NOT NULL,
team_id VARCHAR(50) NOT NULL, team_id VARCHAR(50) NOT NULL,
dataset_id VARCHAR(50) NOT NULL, dataset_id VARCHAR(50) NOT NULL,
collection_id VARCHAR(50) NOT NULL, collection_id VARCHAR(50) NOT NULL,
@@ -24,7 +26,7 @@ export class PgVectorCtrl implements VectorControllerType {
`); `);
await PgClient.query( await PgClient.query(
`CREATE INDEX CONCURRENTLY IF NOT EXISTS vector_index ON ${DatasetVectorTableName} USING hnsw (vector vector_ip_ops) WITH (m = 32, ef_construction = 128);` `CREATE INDEX CONCURRENTLY IF NOT EXISTS vector_index ON ${DatasetVectorTableName} USING hnsw (vector ${isHalfVec ? 'halfvec_ip_ops' : 'vector_ip_ops'}) WITH (m = 32, ef_construction = 128);`
); );
await PgClient.query( await PgClient.query(
`CREATE INDEX CONCURRENTLY IF NOT EXISTS team_dataset_collection_index ON ${DatasetVectorTableName} USING btree(team_id, dataset_id, collection_id);` `CREATE INDEX CONCURRENTLY IF NOT EXISTS team_dataset_collection_index ON ${DatasetVectorTableName} USING btree(team_id, dataset_id, collection_id);`
+4
View File
@@ -13,10 +13,14 @@ declare global {
MULTIPLE_DATA_TO_BASE64: string; MULTIPLE_DATA_TO_BASE64: string;
MONGODB_URI: string; MONGODB_URI: string;
MONGODB_LOG_URI?: string; MONGODB_LOG_URI?: string;
// Vector
VECTOR_VQ_LEVEL: string;
PG_URL: string; PG_URL: string;
OCEANBASE_URL: string; OCEANBASE_URL: string;
MILVUS_ADDRESS: string; MILVUS_ADDRESS: string;
MILVUS_TOKEN: string; MILVUS_TOKEN: string;
SANDBOX_URL: string; SANDBOX_URL: string;
FE_DOMAIN: string; FE_DOMAIN: string;
FILE_DOMAIN: string; FILE_DOMAIN: string;
+43 -43
View File
@@ -3,36 +3,51 @@
"active_model": "Available models", "active_model": "Available models",
"add_default_model": "Add a preset model", "add_default_model": "Add a preset model",
"api_key": "API key", "api_key": "API key",
"app_registration_count": "App registration count",
"audit_log_store_duration": "Audit log storage duration",
"bill_detail": "Bill details",
"bills_and_invoices": "Bills", "bills_and_invoices": "Bills",
"channel": "Channel", "channel": "Channel",
"chat_history_store_duration": "Chat history storage duration",
"config_model": "Model configuration", "config_model": "Model configuration",
"confirm_logout": "Confirm to log out?", "confirm_logout": "Confirm to log out?",
"coupon_included_packages": "Coupon packages",
"create_channel": "Add new channel", "create_channel": "Add new channel",
"create_model": "Add new model", "create_model": "Add new model",
"custom_config_details": "Custom configuration details",
"custom_domain": "Custom Domain", "custom_domain": "Custom Domain",
"custom_model": "custom model",
"custom_domain.domain": "Domain",
"custom_domain.provider": "Domain Provider",
"custom_domain.registration_hint": "Please prepare your own domain and complete the ICP filing through <bold>{{provider}}</bold>, then fill in the domain in the input box below",
"custom_domain.provider.aliyun": "Alibaba Cloud",
"custom_domain.provider.tencent": "Tencent Cloud",
"custom_domain.provider.volcengine": "Volcano Engine",
"custom_domain.DNS_record": "DNS Record", "custom_domain.DNS_record": "DNS Record",
"custom_domain.DNS_record.type": "Type", "custom_domain.DNS_record.type": "Type",
"custom_domain.DNS_resolve_hint": "Please go to your domain service provider and add a CNAME resolution for this domain to <bold>{{domain}}</bold>. After the resolution takes effect, you can bind the custom domain.", "custom_domain.DNS_resolve_hint": "Please go to your domain service provider and add a CNAME resolution for this domain to <bold>{{domain}}</bold>. After the resolution takes effect, you can bind the custom domain.",
"custom_domain.delete_confirm": "Confirm to delete this custom domain?",
"custom_domain.dns_resolved": "Verified", "custom_domain.dns_resolved": "Verified",
"custom_domain.dns_resolving": "Verifying", "custom_domain.dns_resolving": "Verifying",
"custom_domain.delete_confirm": "Confirm to delete this custom domain?", "custom_domain.domain": "Domain",
"custom_domain.status.active": "Active",
"custom_domain.status.inactive": "Inactive",
"custom_domain.domain_verify": "Domain Verification", "custom_domain.domain_verify": "Domain Verification",
"custom_domain.domain_verify.path": "File Path",
"custom_domain.domain_verify.content": "File Content", "custom_domain.domain_verify.content": "File Content",
"custom_domain.domain_verify.desc": "After saving, visiting {{domain}}/{{path}} will return {{content}}", "custom_domain.domain_verify.desc": "After saving, visiting {{domain}}/{{path}} will return {{content}}",
"custom_domain.domain_verify.path": "File Path",
"custom_domain.provider": "Domain Provider",
"custom_domain.provider.aliyun": "Alibaba Cloud",
"custom_domain.provider.tencent": "Tencent Cloud",
"custom_domain.provider.volcengine": "Volcano Engine",
"custom_domain.registration_hint": "Please prepare your own domain and complete the ICP filing through <bold>{{provider}}</bold>, then fill in the domain in the input box below",
"custom_domain.status.active": "Active",
"custom_domain.status.inactive": "Inactive",
"custom_model": "custom model",
"day": "day",
"default_model": "Default model", "default_model": "Default model",
"default_model_config": "Default model configuration", "default_model_config": "Default model configuration",
"extra_ai_points": "AI points calculation standard",
"extra_dataset_size": "Additional knowledge base capacity",
"generation_time": "Generation time",
"has_invoice": "Whether the invoice has been issued",
"language": "Language and time zone", "language": "Language and time zone",
"logout": "Sign out", "logout": "Sign out",
"max_app_amount": "Max app amount",
"max_dataset_amount": "Max dataset amount",
"max_dataset_size": "Max dataset size",
"max_team_member": "Max team members",
"model.active": "Active", "model.active": "Active",
"model.alias": "Alias", "model.alias": "Alias",
"model.alias_tip": "The name of the model displayed in the system is convenient for users to understand.", "model.alias_tip": "The name of the model displayed in the system is convenient for users to understand.",
@@ -77,7 +92,7 @@
"model.request_auth": "Custom key", "model.request_auth": "Custom key",
"model.request_auth_tip": "When making a request to a custom request address, carry the request header: Authorization: Bearer xxx to make the request.", "model.request_auth_tip": "When making a request to a custom request address, carry the request header: Authorization: Bearer xxx to make the request.",
"model.request_url": "Custom url", "model.request_url": "Custom url",
"model.request_url_tip": "If you fill in this value, you will initiate a request directly without passing. \nYou need to follow the API format of Openai and fill in the full request address, such as\n\nLLM: {Host}}/v1/Chat/Completions\n\nEmbedding: {host}}/v1/embeddings\n\nSTT: {Host}/v1/Audio/Transcriptions\n\nTTS: {Host}}/v1/Audio/Speech\n\nRERARARARARARARANK: {Host}}/v1/RERARARARARARARARARARANK", "model.request_url_tip": "If this value is filled in, a request will be made directly to this address without going through the configuration of the model channel.\n\nThe interface needs to follow OpenAIs API format and fill in the complete request address, for example:\n\nLLM: {{host}}/v1/chat/completions\nEmbedding: {{host}}/v1/embeddings\nSTT: {{host}}/v1/audio/transcriptions\nTTS: {{host}}/v1/audio/speech\nRerank: {{host}}/v1/rerank",
"model.response_format": "Response format", "model.response_format": "Response format",
"model.show_stop_sign": "Display stop sequence parameters", "model.show_stop_sign": "Display stop sequence parameters",
"model.show_top_p": "Show Top-p parameters", "model.show_top_p": "Show Top-p parameters",
@@ -95,44 +110,29 @@
"model.voices": "voice role", "model.voices": "voice role",
"model.voices_tip": "Configure multiple through an array, for example:\n\n[\n {\n \"label\": \"Alloy\",\n \"value\": \"alloy\"\n },\n {\n \"label\": \"Echo\",\n \"value\": \"echo\"\n }\n]", "model.voices_tip": "Configure multiple through an array, for example:\n\n[\n {\n \"label\": \"Alloy\",\n \"value\": \"alloy\"\n },\n {\n \"label\": \"Echo\",\n \"value\": \"echo\"\n }\n]",
"model_provider": "Model Provider", "model_provider": "Model Provider",
"month": "month",
"no": "no",
"notifications": "Notify", "notifications": "Notify",
"order_number": "Order number",
"order_type": "Order type",
"payment_method": "Payment method",
"personal_information": "Personal", "personal_information": "Personal",
"personalization": "Personalization", "personalization": "Personalization",
"promotion_records": "Promotions", "promotion_records": "Promotions",
"requests_per_minute": "Requests per minute",
"reset_default": "Restore the default configuration", "reset_default": "Restore the default configuration",
"status": "state",
"subscription_mode_month": "Duration",
"subscription_package": "Subscription package",
"subscription_period": "Subscription cycle",
"support_wallet_amount": "Amount",
"team": "Team", "team": "Team",
"third_party": "Third Party", "third_party": "Third Party",
"usage_records": "Usage",
"bill_detail": "Bill details",
"order_number": "Order number",
"generation_time": "Generation time",
"order_type": "Order type",
"status": "state",
"payment_method": "Payment method",
"support_wallet_amount": "Amount",
"yuan": "¥{{amount}}",
"has_invoice": "Whether the invoice has been issued",
"yes": "yes",
"no": "no",
"subscription_period": "Subscription cycle",
"subscription_package": "Subscription package",
"subscription_mode_month": "Duration",
"month": "month",
"coupon_included_packages": "Coupon packages",
"day": "day",
"extra_dataset_size": "Additional knowledge base capacity",
"extra_ai_points": "AI points calculation standard",
"max_team_member": "Max team members",
"max_app_amount": "Max app amount",
"max_dataset_amount": "Max dataset amount",
"requests_per_minute": "Requests per minute",
"max_dataset_size": "Max dataset size",
"chat_history_store_duration": "Chat history storage duration",
"website_sync_per_dataset": "Website sync per dataset",
"app_registration_count": "App registration count",
"audit_log_store_duration": "Audit log storage duration",
"ticket_response_time": "Ticket response time", "ticket_response_time": "Ticket response time",
"custom_config_details": "Custom configuration details", "upgrade_plan": "Upgrade plan",
"upgrade_to_use_custom_domain": "Current plan does not support custom domains, please upgrade first", "upgrade_to_use_custom_domain": "Current plan does not support custom domains, please upgrade first",
"upgrade_plan": "Upgrade plan" "usage_records": "Usage",
"website_sync_per_dataset": "Website sync per dataset",
"yes": "yes",
"yuan": "¥{{amount}}"
} }
+3 -2
View File
@@ -178,6 +178,7 @@
"interval.6_hours": "Every 6 Hours", "interval.6_hours": "Every 6 Hours",
"interval.per_hour": "Every Hour", "interval.per_hour": "Every Hour",
"invalid_json_format": "JSON format error", "invalid_json_format": "JSON format error",
"json_schema_tip": "Example:\n{\n \"name\": \"test\",\n \"description\":\"测试\",\n \"schema\": {\n \"type\":\"object\",\n \"properties\": {\n \"test\": {\n \"type\": \"string\",\n \"description\": \"Text field\"\n }\n },\n \"required\": [\n \"test\"\n ]\n }\n}",
"keep_the_latest": "Keep the latest", "keep_the_latest": "Keep the latest",
"llm_not_support_vision": "This model does not support image recognition", "llm_not_support_vision": "This model does not support image recognition",
"llm_use_vision": "Vision", "llm_use_vision": "Vision",
@@ -220,10 +221,10 @@
"logs_keys_feedback": "User Feedback", "logs_keys_feedback": "User Feedback",
"logs_keys_lastConversationTime": "last conversation time", "logs_keys_lastConversationTime": "last conversation time",
"logs_keys_messageCount": "Message Count", "logs_keys_messageCount": "Message Count",
"logs_keys_points": "Points Consumed",
"logs_keys_region": "IP & Region",
"logs_keys_only_ip": "Only IP", "logs_keys_only_ip": "Only IP",
"logs_keys_only_region": "Only Region", "logs_keys_only_region": "Only Region",
"logs_keys_points": "Points Consumed",
"logs_keys_region": "IP & Region",
"logs_keys_responseTime": "Average Response Time", "logs_keys_responseTime": "Average Response Time",
"logs_keys_sessionId": "Session ID", "logs_keys_sessionId": "Session ID",
"logs_keys_source": "Source", "logs_keys_source": "Source",
+18 -18
View File
@@ -15,25 +15,25 @@
"create_model": "新增模型", "create_model": "新增模型",
"custom_config_details": "定制配置详情", "custom_config_details": "定制配置详情",
"custom_domain": "自定义域名", "custom_domain": "自定义域名",
"custom_model": "自定义模型",
"custom_domain.domain": "域名",
"custom_domain.provider": "域名备案商",
"custom_domain.registration_hint": "请自备域名并通过 <bold>{{provider}}</bold> 完成备案后,将域名填入下方输入框中",
"custom_domain.provider.aliyun": "阿里云",
"custom_domain.provider.tencent": "腾讯云",
"custom_domain.provider.volcengine": "火山引擎",
"custom_domain.DNS_record": "DNS 记录", "custom_domain.DNS_record": "DNS 记录",
"custom_domain.DNS_record.type": "类型", "custom_domain.DNS_record.type": "类型",
"custom_domain.DNS_resolve_hint": "请到您的域名服务商处,添加该域名的 CNAME 解析到 <bold>{{domain}}</bold>,解析生效后即可绑定自定义域名。", "custom_domain.DNS_resolve_hint": "请到您的域名服务商处,添加该域名的 CNAME 解析到 <bold>{{domain}}</bold>,解析生效后即可绑定自定义域名。",
"custom_domain.delete_confirm": "确认删除该自定义域名?",
"custom_domain.dns_resolved": "已验证", "custom_domain.dns_resolved": "已验证",
"custom_domain.dns_resolving": "验证中", "custom_domain.dns_resolving": "验证中",
"custom_domain.delete_confirm": "确认删除该自定义域名", "custom_domain.domain": "域名",
"custom_domain.status.active": "已生效",
"custom_domain.status.inactive": "已失效",
"custom_domain.domain_verify": "域名校验", "custom_domain.domain_verify": "域名校验",
"custom_domain.domain_verify.path": "文件路径",
"custom_domain.domain_verify.content": "文件内容", "custom_domain.domain_verify.content": "文件内容",
"custom_domain.domain_verify.desc": "保存后,访问 {{domain}}/{{path}} 将返回 {{content}}", "custom_domain.domain_verify.desc": "保存后,访问 {{domain}}/{{path}} 将返回 {{content}}",
"custom_domain.domain_verify.path": "文件路径",
"custom_domain.provider": "域名备案商",
"custom_domain.provider.aliyun": "阿里云",
"custom_domain.provider.tencent": "腾讯云",
"custom_domain.provider.volcengine": "火山引擎",
"custom_domain.registration_hint": "请自备域名并通过 <bold>{{provider}}</bold> 完成备案后,将域名填入下方输入框中",
"custom_domain.status.active": "已生效",
"custom_domain.status.inactive": "已失效",
"custom_model": "自定义模型",
"day": "天", "day": "天",
"default_model": "预设模型", "default_model": "预设模型",
"default_model_config": "默认模型配置", "default_model_config": "默认模型配置",
@@ -92,7 +92,7 @@
"model.request_auth": "自定义请求 Key", "model.request_auth": "自定义请求 Key",
"model.request_auth_tip": "向自定义请求地址发起请求时候,携带请求头:Authorization: Bearer xxx 进行请求", "model.request_auth_tip": "向自定义请求地址发起请求时候,携带请求头:Authorization: Bearer xxx 进行请求",
"model.request_url": "自定义请求地址", "model.request_url": "自定义请求地址",
"model.request_url_tip": "如果填写该值,则会直接向该地址发起请求,不经过 OneAPI。需要遵循 OpenAI 的 API格式,并填写完整请求地址,例如:\nLLM: {{host}}/v1/chat/completions\nEmbedding: {{host}}/v1/embeddings\nSTT: {{host}}/v1/audio/transcriptions\nTTS: {{host}}/v1/audio/speech\nRerank: {{host}}/v1/rerank", "model.request_url_tip": "如果填写该值,则会直接向该地址发起请求,不经过模型渠道的配置。\n接口需要遵循 OpenAI 的 API格式,并填写完整请求地址,例如:\nLLM: {{host}}/v1/chat/completions\nEmbedding: {{host}}/v1/embeddings\nSTT: {{host}}/v1/audio/transcriptions\nTTS: {{host}}/v1/audio/speech\nRerank: {{host}}/v1/rerank",
"model.response_format": "响应格式", "model.response_format": "响应格式",
"model.show_stop_sign": "展示停止序列参数", "model.show_stop_sign": "展示停止序列参数",
"model.show_top_p": "展示 Top-p 参数", "model.show_top_p": "展示 Top-p 参数",
@@ -122,17 +122,17 @@
"requests_per_minute": "QPM", "requests_per_minute": "QPM",
"reset_default": "恢复默认配置", "reset_default": "恢复默认配置",
"status": "状态", "status": "状态",
"subscription_mode_month": "时长",
"subscription_package": "订阅套餐",
"subscription_period": "订阅周期",
"support_wallet_amount": "金额", "support_wallet_amount": "金额",
"team": "团队管理", "team": "团队管理",
"third_party": "第三方账号", "third_party": "第三方账号",
"ticket_response_time": "工单支持响应时间", "ticket_response_time": "工单支持响应时间",
"upgrade_plan": "升级套餐",
"upgrade_to_use_custom_domain": "当前套餐不支持自定义域名,请先升级",
"usage_records": "使用记录", "usage_records": "使用记录",
"website_sync_per_dataset": "站点同步最大页数", "website_sync_per_dataset": "站点同步最大页数",
"yes": "是", "yes": "是",
"yuan": "{{amount}}元", "yuan": "{{amount}}元"
"subscription_period": "订阅周期",
"subscription_package": "订阅套餐",
"subscription_mode_month": "时长",
"upgrade_to_use_custom_domain": "当前套餐不支持自定义域名,请先升级",
"upgrade_plan": "升级套餐"
} }
+3 -2
View File
@@ -182,6 +182,7 @@
"interval.6_hours": "每6小时", "interval.6_hours": "每6小时",
"interval.per_hour": "每小时", "interval.per_hour": "每小时",
"invalid_json_format": "JSON 格式错误", "invalid_json_format": "JSON 格式错误",
"json_schema_tip": "示例:\n{\n \"name\": \"test\",\n \"description\":\"测试\",\n \"schema\": {\n \"type\":\"object\",\n \"properties\": {\n \"test\": {\n \"type\": \"string\",\n \"description\": \"Text field\"\n }\n },\n \"required\": [\n \"test\"\n ]\n }\n}",
"keep_the_latest": "保持最新版本", "keep_the_latest": "保持最新版本",
"llm_not_support_vision": "该模型不支持图片识别", "llm_not_support_vision": "该模型不支持图片识别",
"llm_use_vision": "图片识别", "llm_use_vision": "图片识别",
@@ -224,10 +225,10 @@
"logs_keys_feedback": "用户反馈", "logs_keys_feedback": "用户反馈",
"logs_keys_lastConversationTime": "最后对话时间", "logs_keys_lastConversationTime": "最后对话时间",
"logs_keys_messageCount": "消息总数", "logs_keys_messageCount": "消息总数",
"logs_keys_points": "积分消耗",
"logs_keys_region": "IP及属地",
"logs_keys_only_ip": "仅IP", "logs_keys_only_ip": "仅IP",
"logs_keys_only_region": "仅属地", "logs_keys_only_region": "仅属地",
"logs_keys_points": "积分消耗",
"logs_keys_region": "IP及属地",
"logs_keys_responseTime": "平均响应时长", "logs_keys_responseTime": "平均响应时长",
"logs_keys_sessionId": "会话 ID", "logs_keys_sessionId": "会话 ID",
"logs_keys_source": "来源", "logs_keys_source": "来源",
+16 -19
View File
@@ -14,30 +14,30 @@
"create_channel": "新增管道", "create_channel": "新增管道",
"create_model": "新增模型", "create_model": "新增模型",
"custom_config_details": "定制配置詳情", "custom_config_details": "定制配置詳情",
"custom_model": "自訂模型",
"custom_domain": "自訂域名", "custom_domain": "自訂域名",
"custom_domain.domain": "域名",
"custom_domain.provider": "域名備案商",
"custom_domain.registration_hint": "請自備域名並透過 <bold>{{provider}}</bold> 完成備案後,將域名填入下方輸入框中",
"custom_domain.provider.aliyun": "阿里雲",
"custom_domain.provider.tencent": "騰訊雲",
"custom_domain.provider.volcengine": "火山引擎",
"custom_domain.DNS_record": "DNS 記錄", "custom_domain.DNS_record": "DNS 記錄",
"custom_domain.DNS_record.type": "類型", "custom_domain.DNS_record.type": "類型",
"custom_domain.DNS_resolve_hint": "請到您的域名服務商處,新增該域名的 CNAME 解析到 <bold>{{domain}}</bold>,解析生效後即可繫結自訂域名。", "custom_domain.DNS_resolve_hint": "請到您的域名服務商處,新增該域名的 CNAME 解析到 <bold>{{domain}}</bold>,解析生效後即可繫結自訂域名。",
"custom_domain.delete_confirm": "確認刪除該自訂域名?",
"custom_domain.dns_resolved": "已驗證", "custom_domain.dns_resolved": "已驗證",
"custom_domain.dns_resolving": "驗證中", "custom_domain.dns_resolving": "驗證中",
"custom_domain.delete_confirm": "確認刪除該自訂域名", "custom_domain.domain": "域名",
"custom_domain.status.active": "已生效",
"custom_domain.status.inactive": "已失效",
"custom_domain.domain_verify": "域名校驗", "custom_domain.domain_verify": "域名校驗",
"custom_domain.domain_verify.path": "檔案路徑",
"custom_domain.domain_verify.content": "檔案內容", "custom_domain.domain_verify.content": "檔案內容",
"custom_domain.domain_verify.desc": "儲存後,訪問 {{domain}}/{{path}} 將傳回 {{content}}", "custom_domain.domain_verify.desc": "儲存後,訪問 {{domain}}/{{path}} 將傳回 {{content}}",
"custom_domain.domain_verify.path": "檔案路徑",
"custom_domain.provider": "域名備案商",
"custom_domain.provider.aliyun": "阿里雲",
"custom_domain.provider.tencent": "騰訊雲",
"custom_domain.provider.volcengine": "火山引擎",
"custom_domain.registration_hint": "請自備域名並透過 <bold>{{provider}}</bold> 完成備案後,將域名填入下方輸入框中",
"custom_domain.status.active": "已生效",
"custom_domain.status.inactive": "已失效",
"custom_model": "自訂模型",
"day": "天", "day": "天",
"default_model": "預設模型", "default_model": "預設模型",
"default_model_config": "預設模型設定", "default_model_config": "預設模型設定",
"extra_ai_points": "額外 AI 積分", "extra_ai_points": "AI 積分運算標準",
"extra_dataset_size": "額外知識庫容量", "extra_dataset_size": "額外知識庫容量",
"generation_time": "生成時間", "generation_time": "生成時間",
"has_invoice": "是否已開票", "has_invoice": "是否已開票",
@@ -92,7 +92,7 @@
"model.request_auth": "自訂請求 Key", "model.request_auth": "自訂請求 Key",
"model.request_auth_tip": "向自訂請求地址發起請求時候,攜帶請求頭:Authorization: Bearer xxx 進行請求", "model.request_auth_tip": "向自訂請求地址發起請求時候,攜帶請求頭:Authorization: Bearer xxx 進行請求",
"model.request_url": "自訂請求地址", "model.request_url": "自訂請求地址",
"model.request_url_tip": "如果填寫該值,則會直接向該地址發起請求,不經過 OneAPI。需要遵循 OpenAI 的 API 格式,並填寫完整請求地址,例如:\nLLM: {{host}}/v1/chat/completions\nEmbedding: {{host}}/v1/embeddings\nSTT: {{host}}/v1/audio/transcriptions\nTTS: {{host}}/v1/audio/speech\nRerank: {{host}}/v1/rerank", "model.request_url_tip": "如果填寫該值,則會直接向該地址發起請求,不經過模型渠道的配置。\n\n接口需要遵循 OpenAI 的 API格式,並填寫完整請求地址,例如:\nLLM: {{host}}/v1/chat/completions\nEmbedding: {{host}}/v1/embeddings\nSTT: {{host}}/v1/audio/transcriptions\nTTS: {{host}}/v1/audio/speech\nRerank: {{host}}/v1/rerank",
"model.response_format": "響應格式", "model.response_format": "響應格式",
"model.show_stop_sign": "展示停止序列參數", "model.show_stop_sign": "展示停止序列參數",
"model.show_top_p": "展示 Top-p 參數", "model.show_top_p": "展示 Top-p 參數",
@@ -129,13 +129,10 @@
"team": "團隊管理", "team": "團隊管理",
"third_party": "第三方帳號", "third_party": "第三方帳號",
"ticket_response_time": "工單支援響應時間", "ticket_response_time": "工單支援響應時間",
"upgrade_plan": "升級套餐",
"upgrade_to_use_custom_domain": "目前套餐不支援自訂域名,請先升級",
"usage_records": "使用記錄", "usage_records": "使用記錄",
"website_sync_per_dataset": "站點同步最大頁數", "website_sync_per_dataset": "站點同步最大頁數",
"yes": "是", "yes": "是",
"yuan": "{{amount}}元", "yuan": "{{amount}}元"
"month": "月",
"extra_dataset_size": "額外知識庫容量",
"extra_ai_points": "AI 積分運算標準",
"upgrade_to_use_custom_domain": "目前套餐不支援自訂域名,請先升級",
"upgrade_plan": "升級套餐"
} }
+1
View File
@@ -177,6 +177,7 @@
"interval.6_hours": "每 6 小時", "interval.6_hours": "每 6 小時",
"interval.per_hour": "每小時", "interval.per_hour": "每小時",
"invalid_json_format": "JSON 格式錯誤", "invalid_json_format": "JSON 格式錯誤",
"json_schema_tip": "示例:\n{\n \"name\": \"test\",\n \"description\":\"測試\",\n \"schema\": {\n \"type\":\"object\",\n \"properties\": {\n \"test\": {\n \"type\": \"string\",\n \"description\": \"Text field\"\n }\n },\n \"required\": [\n \"test\"\n ]\n }\n}",
"keep_the_latest": "保持最新版本", "keep_the_latest": "保持最新版本",
"llm_not_support_vision": "這個模型不支援圖片辨識", "llm_not_support_vision": "這個模型不支援圖片辨識",
"llm_use_vision": "圖片辨識", "llm_use_vision": "圖片辨識",
+1
View File
@@ -54,6 +54,7 @@ MONGODB_URI="mongodb://myusername:mypassword@localhost:27017/fastgpt?authSource=
MONGODB_LOG_URI="mongodb://myusername:mypassword@localhost:27017/fastgpt?authSource=admin&directConnection=true" MONGODB_LOG_URI="mongodb://myusername:mypassword@localhost:27017/fastgpt?authSource=admin&directConnection=true"
# 向量库优先级: pg > oceanbase > milvus # 向量库优先级: pg > oceanbase > milvus
# PG 向量库连接参数 # PG 向量库连接参数
VECTOR_VQ_LEVEL=16 # 向量量化等级(目前支持 PG:32,16, 其他数据库未支持)
PG_URL=postgresql://username:password@localhost:5432/postgres PG_URL=postgresql://username:password@localhost:5432/postgres
# OceanBase 向量库连接参数 # OceanBase 向量库连接参数
# OCEANBASE_URL= # OCEANBASE_URL=
@@ -396,7 +396,10 @@ const AIChatSettingsModal = ({
{responseFormat === 'json_schema' && ( {responseFormat === 'json_schema' && (
<Flex {...FlexItemStyles} h="auto"> <Flex {...FlexItemStyles} h="auto">
<Box {...LabelStyles}> <Box {...LabelStyles}>
<Flex alignItems={'center'}>JSON Schema</Flex> <Flex alignItems={'center'}>
<Box>JSON Schema</Box>
<QuestionTip label={t('app:json_schema_tip')} />
</Flex>
</Box> </Box>
<Box flex={'1 0 0'}> <Box flex={'1 0 0'}>
<JsonEditor <JsonEditor