Optimize ./picoclaw status output to support all config file configurations.
This commit is contained in:
parent
ae56b1e5f1
commit
5bcd90085d
1 changed files with 14 additions and 0 deletions
|
|
@ -729,6 +729,11 @@ func statusCmd() {
|
||||||
hasZhipu := cfg.Providers.Zhipu.APIKey != ""
|
hasZhipu := cfg.Providers.Zhipu.APIKey != ""
|
||||||
hasGroq := cfg.Providers.Groq.APIKey != ""
|
hasGroq := cfg.Providers.Groq.APIKey != ""
|
||||||
hasVLLM := cfg.Providers.VLLM.APIBase != ""
|
hasVLLM := cfg.Providers.VLLM.APIBase != ""
|
||||||
|
hasMoonshot := cfg.Providers.Moonshot.APIKey != ""
|
||||||
|
hasDeepSeek := cfg.Providers.DeepSeek.APIKey != ""
|
||||||
|
hasVolcEngine := cfg.Providers.VolcEngine.APIKey != ""
|
||||||
|
hasNvidia := cfg.Providers.Nvidia.APIKey != ""
|
||||||
|
hasOllama := cfg.Providers.Ollama.APIBase != ""
|
||||||
|
|
||||||
status := func(enabled bool) string {
|
status := func(enabled bool) string {
|
||||||
if enabled {
|
if enabled {
|
||||||
|
|
@ -742,11 +747,20 @@ func statusCmd() {
|
||||||
fmt.Println("Gemini API:", status(hasGemini))
|
fmt.Println("Gemini API:", status(hasGemini))
|
||||||
fmt.Println("Zhipu API:", status(hasZhipu))
|
fmt.Println("Zhipu API:", status(hasZhipu))
|
||||||
fmt.Println("Groq API:", status(hasGroq))
|
fmt.Println("Groq API:", status(hasGroq))
|
||||||
|
fmt.Println("Moonshot API:", status(hasMoonshot))
|
||||||
|
fmt.Println("DeepSeek API:", status(hasDeepSeek))
|
||||||
|
fmt.Println("VolcEngine API:", status(hasVolcEngine))
|
||||||
|
fmt.Println("Nvidia API:", status(hasNvidia))
|
||||||
if hasVLLM {
|
if hasVLLM {
|
||||||
fmt.Printf("vLLM/Local: ✓ %s\n", cfg.Providers.VLLM.APIBase)
|
fmt.Printf("vLLM/Local: ✓ %s\n", cfg.Providers.VLLM.APIBase)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("vLLM/Local: not set")
|
fmt.Println("vLLM/Local: not set")
|
||||||
}
|
}
|
||||||
|
if hasOllama {
|
||||||
|
fmt.Printf("Ollama: ✓ %s\n", cfg.Providers.Ollama.APIBase)
|
||||||
|
} else {
|
||||||
|
fmt.Println("Ollama: not set")
|
||||||
|
}
|
||||||
|
|
||||||
store, _ := auth.LoadStore()
|
store, _ := auth.LoadStore()
|
||||||
if store != nil && len(store.Credentials) > 0 {
|
if store != nil && len(store.Credentials) > 0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue