From 11bf18391e258d74a7732055a6ea495533904d88 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Tue, 28 Nov 2023 10:22:12 +0800 Subject: [PATCH] update docs --- README.md | 4 ++++ main.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 535b98d..da31324 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,12 @@ Usage of ./openai-api-route: 监听地址(默认为 ":8888") -upstreams string 上游配置文件(默认为 "./upstreams.yaml") + -dbtype + 数据库类型 (sqlite 或 postgres,默认为 sqlite) -database string 数据库地址(默认为 "./db.sqlite") + 如果数据库为 postgres ,则此值应 PostgreSQL DSN 格式 + 例如 "host=127.0.0.1 port=5432 user=postgres dbname=openai_api_route sslmode=disable password=woshimima" -list 列出所有上游 -noauth diff --git a/main.go b/main.go index 04df40a..cccac6a 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ var config Config func main() { dbType := flag.String("dbtype", "sqlite", "Database type (sqlite or postgres)") - dbAddr := flag.String("database", "./db.sqlite", "Database address") + dbAddr := flag.String("database", "./db.sqlite", "Database address, if dbType is postgres, this is the DSN connection string") configFile := flag.String("config", "./config.yaml", "Config file") listenAddr := flag.String("addr", ":8888", "Listening address") listMode := flag.Bool("list", false, "List all upstream")