Skip to content

Commit

Permalink
feat: Configure Ollama URL within provider config
Browse files Browse the repository at this point in the history
This change simplifies the Ollama configuration by moving the url parameter into the ollama provider section within LLM_CONFIG. It also increases the Ollama timeout from 30 seconds to 120 seconds. The top-level ollama_url, timeout, and max_retries configurations are removed, as these are now managed within the ollama provider config.
  • Loading branch information
psyray committed Feb 11, 2025
1 parent 1497111 commit d04410f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions web/reNgine/llm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,18 @@
'temperature': 0.7,
},
'ollama': {
'url': OLLAMA_INSTANCE,
'default_model': 'llama2',
'models': [
'llama2',
'mistral',
'codellama',
'gemma'
],
'timeout': 30,
'timeout': 120,
'max_retries': 3,
}
},
'ollama_url': OLLAMA_INSTANCE,
'timeout': 30,
'max_retries': 3,
'prompts': {
'vulnerability': {
'context': VULNERABILITY_CONTEXT,
Expand Down
2 changes: 1 addition & 1 deletion web/reNgine/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _setup_ollama(self) -> None:
"""Setup Ollama client with configuration"""
ollama_config = self.config['providers']['ollama']
self.ollama = Ollama(
base_url=self.config['ollama_url'],
base_url=ollama_config['url'],
model=self.model_name,
timeout=ollama_config['timeout']
)
Expand Down

0 comments on commit d04410f

Please sign in to comment.