Skip to content
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

add ollama model options:llama-vision,qwen2.5 #1774

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

csuwl
Copy link
Contributor

@csuwl csuwl commented Nov 20, 2024

add ollama model options:llama-vision,qwen2.5

@Override
public String getName() {
return this.id;
return this.id + (null == this.size ? "" : ":" + this.size);

Choose a reason for hiding this comment

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

Missing Null Handling in getName:

The logic in getName assumes size will be null or non-empty but doesn't guard against unexpected input like an empty string.
Add validation to handle this edge case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there is no difference between id and name, then that's right

@Override
public String getName() {
return this.id;
return this.id + (null == this.size ? "" : ":" + this.size);

Choose a reason for hiding this comment

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

Suggested change
return this.id + (null == this.size ? "" : ":" + this.size);
return this.id + (this.size == null || this.size.isEmpty() ? "" : ":" + this.size);

…llama/api/OllamaModel.java


If there is no difference between id and name, then that's right

Co-authored-by: ogbozoyan <85520525+ogbozoyan@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.

2 participants