mirror of
https://github.com/icereed/paperless-gpt.git
synced 2025-03-13 13:18:02 -05:00
Specific error messages for missing environment variables (#21)
This commit is contained in:
parent
d1e990ff4b
commit
83088e1e15
1 changed files with 12 additions and 4 deletions
16
main.go
16
main.go
|
@ -60,12 +60,20 @@ Be very selective and only choose the most relevant tags since too many tags wil
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if paperlessBaseURL == "" || paperlessAPIToken == "" {
|
if paperlessBaseURL == "" {
|
||||||
log.Fatal("Please set the PAPERLESS_BASE_URL and PAPERLESS_API_TOKEN environment variables.")
|
log.Fatal("Please set the PAPERLESS_BASE_URL environment variable.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if llmProvider == "" || llmModel == "" {
|
if paperlessAPIToken == "" {
|
||||||
log.Fatal("Please set the LLM_PROVIDER and LLM_MODEL environment variables.")
|
log.Fatal("Please set the PAPERLESS_API_TOKEN environment variable.")
|
||||||
|
}
|
||||||
|
|
||||||
|
if llmProvider == "" {
|
||||||
|
log.Fatal("Please set the LLM_PROVIDER environment variable.")
|
||||||
|
}
|
||||||
|
|
||||||
|
if llmModel == "" {
|
||||||
|
log.Fatal("Please set the LLM_MODEL environment variable.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if llmProvider == "openai" && openaiAPIKey == "" {
|
if llmProvider == "openai" && openaiAPIKey == "" {
|
||||||
|
|
Loading…
Reference in a new issue