Commit 11458434 authored by 王舵's avatar 王舵

init: rm applicaiton-dev.yml from git \n add schema-mysql.sql

parent 90b3874a
...@@ -215,3 +215,4 @@ Thumbs.db ...@@ -215,3 +215,4 @@ Thumbs.db
ehthumbs.db ehthumbs.db
Icon? Icon?
*.icon? *.icon?
backend/src/main/resources/application-dev.yml
\ No newline at end of file
# 开发环境专用配置
spring:
# 开发环境数据源配置
datasource:
url: jdbc:h2:mem:hiagent_dev;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
driver-class-name: org.h2.Driver
username: sa
password: sa
# 开发环境JPA配置
jpa:
hibernate:
ddl-auto: create-drop
show-sql: true
properties:
hibernate:
format_sql: true
# 开启H2控制台
h2:
console:
enabled: true
path: /h2-console
# 开发环境Redis配置
data:
redis:
host: localhost
port: 6379
# 开发环境详细日志配置
logging:
level:
root: INFO
pangea.hiagent: DEBUG
pangea.hiagent.websocket: TRACE
pangea.hiagent.service: DEBUG
pangea.hiagent.controller: DEBUG
pangea.hiagent.tools: DEBUG
org.springframework: INFO
org.springframework.web: INFO
org.springframework.security: INFO
org.springframework.web.socket: INFO
org.springframework.web.socket.handler: INFO
org.springframework.web.socket.messaging: INFO
org.hibernate.SQL: INFO
org.hibernate.type.descriptor.sql.BasicBinder: INFO
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} [%X{userId:-N/A}] - %msg%n"
# 开发环境服务器配置
server:
port: 8080
undertow:
# 开发环境降低线程数
io-threads: 2
worker-threads: 10
accesslog:
enabled: true
pattern: "%t %a \"%r\" %s (%D ms)"
dir: logs
prefix: access_log_dev_
# 开发环境应用配置
hiagent:
jwt:
secret: dev-secret-key-for-development-only-do-not-use-in-production
expiration: 86400000 # 24小时
llm:
providers:
deepseek:
default-api-key: ${DEEPSEEK_API_KEY:your-dev-api-key-here}
openai:
default-api-key: ${OPENAI_API_KEY:your-dev-api-key-here}
# 开发环境ChatMemory配置
app:
chat-memory:
implementation: caffeine
caffeine:
enabled: true
redis:
enabled: false
\ No newline at end of file
-- 插入默认数据 -- 插入默认数据
-- 插入默认用户数据 -- 插入默认用户数据
MERGE INTO sys_user (id, username, password, email, nickname, status, role) VALUES INSERT INTO sys_user (id, username, password, email, nickname, status, role) VALUES
('user-001', 'admin', '$2a$10$N.zmdr9k7uOCQb0bta/OauRxaOKSr.QhqyD2R5FKvMQjmHoLkm5Sy', 'admin@hiagent.com', 'Admin', 'active', 'admin'); ('user-001', 'admin', '$2a$10$N.zmdr9k7uOCQb0bta/OauRxaOKSr.QhqyD2R5FKvMQjmHoLkm5Sy', 'admin@hiagent.com', 'Admin', 'active', 'admin');
-- 插入默认LLM配置数据 -- 插入默认LLM配置数据
MERGE INTO llm_config (id, name, description, provider, model_name, api_key, base_url, temperature, max_tokens, top_p, enabled, owner) VALUES INSERT INTO llm_config (id, name, description, provider, model_name, api_key, base_url, temperature, max_tokens, top_p, enabled, owner) VALUES
('deepseek-default', 'deepseek-default', 'DeepSeek默认配置', 'deepseek', 'deepseek-chat', '', 'https://api.deepseek.com', 0.7, 4096, 0.9, true, 'user-001'), ('deepseek-default', 'deepseek-default', 'DeepSeek默认配置', 'deepseek', 'deepseek-chat', '', 'https://api.deepseek.com', 0.7, 4096, 0.9, true, 'user-001'),
('openai-default', 'openai-default', 'OpenAI默认配置', 'openai', 'gpt-3.5-turbo', '', 'https://api.openai.com/v1', 0.7, 4096, 0.9, false, 'user-001'), ('openai-default', 'openai-default', 'OpenAI默认配置', 'openai', 'gpt-3.5-turbo', '', 'https://api.openai.com/v1', 0.7, 4096, 0.9, false, 'user-001'),
('ollama-default', 'ollama-default', 'Ollama默认配置', 'ollama', 'llama2', '', 'http://localhost:11434', 0.7, 4096, 0.9, true, 'user-001'), ('ollama-default', 'ollama-default', 'Ollama默认配置', 'ollama', 'llama2', '', 'http://localhost:11434', 0.7, 4096, 0.9, true, 'user-001'),
('hisense-default', 'hisense-default', 'Hisense默认配置', 'hisense', 'gpt-4-1', '', 'http://openai-proxy-v2-jt-higpt.cloudprd.hisense.com', 0.7, 4096, 0.9, true, 'user-001'); ('hisense-default', 'hisense-default', 'Hisense默认配置', 'hisense', 'gpt-4-1', '', 'http://openai-proxy-v2-jt-higpt.cloudprd.hisense.com', 0.7, 4096, 0.9, true, 'user-001');
-- 插入默认Agent数据 -- 插入默认Agent数据
MERGE INTO agent (id, name, description, status, default_model, owner, system_prompt, enable_re_act, history_length, enable_rag, rag_collection_id, rag_top_k, rag_score_threshold, top_k, presence_penalty, frequency_penalty, prompt_template, rag_prompt_template, enable_streaming) VALUES MERGE INTO agent (id, name, description, status, default_model, owner, system_prompt, enable_re_act, history_length, enable_rag, rag_collection_id, rag_top_k, rag_score_threshold, top_k, presence_penalty, frequency_penalty, prompt_template, rag_prompt_template, enable_streaming) VALUES
...@@ -34,8 +34,10 @@ MERGE INTO agent_tool_relation (id, agent_id, tool_id) VALUES ...@@ -34,8 +34,10 @@ MERGE INTO agent_tool_relation (id, agent_id, tool_id) VALUES
('relation-14', 'agent-5', 'tool-1'), ('relation-14', 'agent-5', 'tool-1'),
('relation-15', 'agent-5', 'tool-11'), ('relation-15', 'agent-5', 'tool-11'),
('relation-16', 'agent-5', 'tool-12'); ('relation-16', 'agent-5', 'tool-12');
('relation-17', 'agent-1', 'tool-13');
-- 插入默认工具数据 -- 插入默认工具数据
MERGE INTO tool (id, name, display_name, description, category, status, bean_name, owner, timeout, http_method, parameters, return_type, return_schema, implementation, api_endpoint, headers, auth_type, auth_config) VALUES MERGE INTO tool (id, name, display_name, description, category, status, bean_name, owner, timeout, http_method, parameters, return_type, return_schema, implementation, api_endpoint, headers, auth_type, auth_config) VALUES
('tool-1', 'search', '搜索工具', '进行网络搜索查询', 'API', 'active', 'searchTool', 'user-001', 30000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}'), ('tool-1', 'search', '搜索工具', '进行网络搜索查询', 'API', 'active', 'searchTool', 'user-001', 30000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}'),
('tool-2', 'calculator', '计算器', '进行数学计算', 'FUNCTION', 'active', 'calculatorTools', 'user-001', 5000, 'POST', '{}', 'number', '{}', '', '', '{}', '', '{}'), ('tool-2', 'calculator', '计算器', '进行数学计算', 'FUNCTION', 'active', 'calculatorTools', 'user-001', 5000, 'POST', '{}', 'number', '{}', '', '', '{}', '', '{}'),
...@@ -49,8 +51,10 @@ MERGE INTO tool (id, name, display_name, description, category, status, bean_nam ...@@ -49,8 +51,10 @@ MERGE INTO tool (id, name, display_name, description, category, status, bean_nam
('tool-10', 'documentTemplate', '文档模板', '提供各种类型的文档模板', 'FUNCTION', 'active', 'documentTemplateTool', 'user-001', 10000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}'), ('tool-10', 'documentTemplate', '文档模板', '提供各种类型的文档模板', 'FUNCTION', 'active', 'documentTemplateTool', 'user-001', 10000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}'),
('tool-11', 'studyPlanGeneration', '学习计划制定', '根据学习目标和时间安排制定个性化的学习计划', 'FUNCTION', 'active', 'studyPlanGenerationTool', 'user-001', 10000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}'), ('tool-11', 'studyPlanGeneration', '学习计划制定', '根据学习目标和时间安排制定个性化的学习计划', 'FUNCTION', 'active', 'studyPlanGenerationTool', 'user-001', 10000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}'),
('tool-12', 'courseMaterialRetrieval', '课程资料检索', '检索和查询相关课程资料', 'FUNCTION', 'active', 'courseMaterialRetrievalTool', 'user-001', 10000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}'); ('tool-12', 'courseMaterialRetrieval', '课程资料检索', '检索和查询相关课程资料', 'FUNCTION', 'active', 'courseMaterialRetrievalTool', 'user-001', 10000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}');
('tool-13', 'HisenseSsoAuthTool', 'HisenseSSO认证工具', '用于Hisense SSO认证的工具', 'FUNCTION', 'active', 'user-001', 10000, 'GET', '{}', 'object', '{}', '', '', '{}', '', '{}');
-- 插入默认工具配置数据 -- 插入默认工具配置数据
MERGE INTO tool_configs (id, tool_name, param_name, param_value, description, default_value, type, required, group_name) VALUES MERGE INTO tool_configs (id, tool_name, param_name, param_value, description, default_value, type, required, group_name) VALUES
('config-1', 'search', 'apiKey', 'test-key-123', '搜索引擎API密钥', '', 'string', 1, 'auth'), ('config-1', 'search', 'apiKey', 'test-key-123', '搜索引擎API密钥', '', 'string', 1, 'auth'),
('config-2', 'search', 'endpoint', 'https://api.search.com/v1/search', '搜索引擎API端点', 'https://api.search.com/v1/search', 'string', 1, 'connection'); ('config-2', 'search', 'endpoint', 'https://api.search.com/v1/search', '搜索引擎API端点', 'https://api.search.com/v1/search', 'string', 1, 'connection');
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment