-
-
Notifications
You must be signed in to change notification settings - Fork 49
Removed the hardcoded Ollama Models and now works with any Ollama Model #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
874da2c
Removed the hardcoded Ollama Models and now works with any Ollama Model
sujay-d07 8d5d98a
Refactor code for improved readability by removing unnecessary blank …
sujay-d07 13fbca3
Update tests/test_ask.py
sujay-d07 9aa48a9
Update cortex/ask.py
sujay-d07 f5bafc0
Update tests/test_ask.py
sujay-d07 58f9895
Update cortex/first_run_wizard.py
sujay-d07 2ce4dc6
Update tests/test_ollama_integration.py
sujay-d07 7891b5f
Refactor input handling in first_run_wizard to use _prompt method for…
sujay-d07 5fc95f9
.
sujay-d07 3c3af6a
Refactor CLA check script for improved readability and consistency; u…
sujay-d07 2a643dc
Merge branch 'cortexlinux:main' into issue-383
sujay-d07 dbea5e0
Remove redundant import of Path in AskHandler class
sujay-d07 36e8670
Merge branch 'cortexlinux:main' into issue-383
sujay-d07 a93bc53
Merge branch 'cortexlinux:main' into issue-383
sujay-d07 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Extract duplicated _get_ollama_model logic to a shared utility module.
This method is duplicated identically in
cortex/llm/interpreter.py(lines 68-90). Maintaining the same logic in multiple files violates DRY principles and creates maintenance risk—any bug fixes or enhancements must be applied in both locations.Recommended refactoring approach
Create a shared utility module (e.g.,
cortex/config_utils.py) and extract this logic:Then update both files to use the shared function:
🤖 Prompt for AI Agents