forked from niuniu/llm-intelligence
fix: default openrouter key from env
This commit is contained in:
@@ -93,7 +93,7 @@ func main() {
|
|||||||
|
|
||||||
func parseArgs() Config {
|
func parseArgs() Config {
|
||||||
loadProjectEnv()
|
loadProjectEnv()
|
||||||
apiKey := flag.String("api-key", "", "OpenRouter API Key")
|
apiKey := flag.String("api-key", os.Getenv("OPENROUTER_API_KEY"), "OpenRouter API Key")
|
||||||
apiURL := flag.String("api-url", "https://openrouter.ai/api/v1/models", "API 地址")
|
apiURL := flag.String("api-url", "https://openrouter.ai/api/v1/models", "API 地址")
|
||||||
outPath := flag.String("out", "models.json", "输出文件路径")
|
outPath := flag.String("out", "models.json", "输出文件路径")
|
||||||
maxRetries := flag.Int("retry", 3, "最大重试次数")
|
maxRetries := flag.Int("retry", 3, "最大重试次数")
|
||||||
|
|||||||
Reference in New Issue
Block a user