94f7186cce
- Implemented image upload API in the article service, allowing users to upload images associated with articles. - Added validation for image size and type, ensuring only supported formats (PNG, JPG, GIF, WebP) are accepted. - Created a new Aliyun object storage client to handle image storage and retrieval. - Updated the article handler to include an endpoint for image uploads. - Enhanced error handling for image upload failures and added relevant error messages. - Introduced public URL generation for stored images, allowing access via signed tokens. - Updated localization files to include new messages related to image upload functionality. - Added tests for image upload and retrieval processes.
88 lines
2.0 KiB
Plaintext
88 lines
2.0 KiB
Plaintext
# Copy this file to config.local.yaml and adjust values for your local environment.
|
|
# config.local.yaml is gitignored.
|
|
|
|
server:
|
|
port: 8080
|
|
mode: debug
|
|
|
|
database:
|
|
host: localhost
|
|
port: 5432
|
|
user: geo
|
|
password: geo_dev
|
|
dbname: geo
|
|
|
|
redis:
|
|
addr: localhost:6379
|
|
|
|
qdrant:
|
|
url: localhost:6334
|
|
collection: geo_knowledge_chunks
|
|
timeout: 15s
|
|
|
|
object_storage:
|
|
provider: minio
|
|
endpoint: localhost:9000
|
|
bucket: geo-private
|
|
use_ssl: false
|
|
public_base_url: ""
|
|
region: ""
|
|
# Prefer environment override for secrets:
|
|
# export OBJECT_STORAGE_ACCESS_KEY=minioadmin
|
|
# export OBJECT_STORAGE_SECRET_KEY=minioadmin
|
|
# MinIO example:
|
|
# provider: minio
|
|
# endpoint: localhost:9000
|
|
# bucket: geo-private
|
|
# use_ssl: false
|
|
#
|
|
# Aliyun OSS example:
|
|
# provider: aliyun
|
|
# endpoint: https://oss-cn-hangzhou.aliyuncs.com
|
|
# bucket: your-bucket
|
|
# region: cn-hangzhou
|
|
# use_ssl: true
|
|
# public_base_url: https://your-bucket.oss-cn-hangzhou.aliyuncs.com
|
|
# export OBJECT_STORAGE_ACCESS_KEY=your-access-key
|
|
# export OBJECT_STORAGE_SECRET_KEY=your-secret-key
|
|
|
|
jwt:
|
|
secret: "your-local-secret"
|
|
|
|
llm:
|
|
provider: ark
|
|
base_url: https://ark.cn-beijing.volces.com/api/v3
|
|
model: doubao-seed-2-0-lite-260215
|
|
knowledge_url_model: doubao-seed-2-0-mini-260215
|
|
timeout: 2m
|
|
max_output_tokens: 4000
|
|
temperature: 0.7
|
|
reasoning_effort: minimal
|
|
web_search_limit: 3
|
|
# top_p: 0.95
|
|
# Prefer environment override for secrets:
|
|
# export LLM_API_KEY=your-api-key
|
|
|
|
retrieval:
|
|
provider: siliconflow
|
|
base_url: https://api.siliconflow.cn/v1
|
|
embedding_model: BAAI/bge-m3
|
|
reranker_model: BAAI/bge-reranker-v2-m3
|
|
timeout: 30s
|
|
chunk_size: 900
|
|
chunk_overlap: 120
|
|
embedding_batch_size: 16
|
|
recall_limit: 12
|
|
rerank_top_n: 6
|
|
max_chunks_per_doc: 6
|
|
overlap_tokens: 60
|
|
# Prefer environment override for retrieval api key:
|
|
# export SILICONFLOW_API_KEY=your-siliconflow-api-key
|
|
# or export RETRIEVAL_API_KEY=your-retrieval-api-key
|
|
|
|
generation:
|
|
queue_size: 128
|
|
worker_concurrency: 1
|
|
stream_enabled: false
|
|
article_timeout: 8m
|