Skip to content

Conversation

@Rizzen
Copy link
Member

@Rizzen Rizzen commented Dec 3, 2025

Motivation and Context

Breaking Changes


Type of the changes

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tests improvement
  • Refactoring

Checklist

  • The pull request has a description of the proposed change
  • I read the Contributing Guidelines before opening the pull request
  • The pull request uses develop as the base branch
  • Tests for the changes have been added
  • All new and existing tests passed
Additional steps for pull requests adding a new feature
  • An issue describing the proposed change exists
  • The pull request includes a link to the issue
  • The change was discussed and approved in the issue
  • Docs have been added / updated

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Qodana for JVM

1170 new problems were found

Inspection name Severity Problems
Check Kotlin and Java source code coverage 🔶 Warning 1159
Missing KDoc for public API declaration 🔶 Warning 11
@@ Code coverage @@
+ 72% total lines covered
16829 lines analyzed, 12196 lines covered
# Calculated according to the filters of your coverage tool

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Copy link
Contributor

@aozherelyeva aozherelyeva left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Collaborator

@tiginamaria tiginamaria left a comment

Choose a reason for hiding this comment

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

Looks nice, thank you!
Just make a small adjustment to make content collection ordered please


var textAttachments = ""

parts.forEach { part ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's join this parts.forEach with one in line 63 and aggregate the text part content and file part content in order in the parts list using string builder.
So just simply replace empty case with append ContentPart.Text -> { // append } and move ContentPart.File up and append file content to the same builder.

The order may be important here as we could create prompt like text { In file following file count A }, file { AAA }, text { In file following file count B }, file { BBBB } so me need them to follow the order in the resulting content.

Copy link
Member Author

Choose a reason for hiding this comment

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

Problem is - code above collects parts for images and it passes them to images field. Unfortunately t's not allowed to pass anything other than base64 images, and I'm not sure it's the proper way to pass text files content.
And there is no separate field for other files, according to API docs

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure, I understand the reason why it's done like this, but we can still join the content in the right order and get rid of second forEach

@tiginamaria tiginamaria self-requested a review December 5, 2025 10:58
Copy link
Collaborator

@tiginamaria tiginamaria left a comment

Choose a reason for hiding this comment

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

Looks nice, thank you!

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Qodana for JVM

1170 new problems were found

Inspection name Severity Problems
Check Kotlin and Java source code coverage 🔶 Warning 1159
Missing KDoc for public API declaration 🔶 Warning 11
@@ Code coverage @@
+ 72% total lines covered
16823 lines analyzed, 12196 lines covered
# Calculated according to the filters of your coverage tool

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@Rizzen Rizzen merged commit fbe08f0 into develop Dec 5, 2025
16 of 19 checks passed
@Rizzen Rizzen deleted the mark/ollama-files branch December 5, 2025 13:48
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.

4 participants