Skip to content

Conversation

@navilg
Copy link

@navilg navilg commented Apr 13, 2025

Instead of updating config.toml file to configure Perplexica, We can use environment variables to configure those configs.

For example to configure below section

[MODELS.CUSTOM_OPENAI]
API_KEY = "sk-123456"
API_URL = "http://localopenai:11134"
MODEL_NAME = "meta-llama/llama-4"

we can set envrionment variable MODELS_CUSTOM_OPENAI_API_KEY="sk-123456", MODELS_CUSTOM_OPENAI_API_URL="http://localopenai:11134" and MODELS_CUSTOM_OPENAI_MODEL_NAME="meta-llama/llama-4" by simply setting variable SECTION_WITH_DOTS_REPLACED_WITH_UNDERSCORE_KEYNAME=VALUE

This will fix issue #673 and #750.

- MODELS_CUSTOM_OPENAI_API_KEY=""
- MODELS_CUSTOM_OPENAI_API_URL=""
- MODELS_CUSTOM_OPENAI_MODEL_NAME=""
- MODELS_OLLAMA_API_KEY="" # Ollama API URL - http://host.docker.internal:11434
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be MODELS_OLLAMA_API_URL

- MODELS_CUSTOM_OPENAI_MODEL_NAME=""
- MODELS_OLLAMA_API_KEY="" # Ollama API URL - http://host.docker.internal:11434
- MODELS_DEEPSEEK_API_KEY=""
- MODELS_LM_STUDIO_API_KEY="" # LM Studio API URL - http://host.docker.internal:1234
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be MODELS_LM_STUDIO_API_URL

@navilg
Copy link
Author

navilg commented Jun 4, 2025

Thanks for reviewing PR @djmaze . I have corrected the code as per your comment and fixed the merged conflict.

@carbolymer
Copy link

Any chance to push this forward?

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic found 2 issues across 4 files. Review them in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

navilg and others added 2 commits July 14, 2025 11:19
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants