-
Notifications
You must be signed in to change notification settings - Fork 218
[prompt] Improve attachments (former media content) support in prompt messages #264
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
Conversation
* @property id The unique identifier for the prompt. | ||
* @property params The language model pa rameters associated with the prompt. Defaults to [LLMParams]. | ||
*/ | ||
// FIXME move it from dsl package up to the module root package? |
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.
This is not related directly to this PR, but I've noticed it while preparing it and want to raise a question. Currently, Prompt
class is located in the dsl
package, which seems kinda strange, since it's not about DSL, but rather a core structure of this whole module, a prompt model. So I think it's better to move it to the root module package or at least together with other models to model
Qodana for JVM105 new problems were found
@@ Code coverage @@
+ 50% total lines covered
5804 lines analyzed, 2943 lines covered
# Calculated according to the filters of your coverage tool ☁️ View the detailed Qodana report Detected 116 dependenciesThird-party software listThis page lists the third-party software dependencies used in koog-agents
Contact Qodana teamContact us at [email protected]
|
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/message/Message.kt
Outdated
Show resolved
Hide resolved
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/message/Attachment.kt
Outdated
Show resolved
Hide resolved
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.
@EugeneTheDev please change the method names to shorter polymorphic ones. Other things LGTM
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/AttachmentBuilder.kt
Outdated
Show resolved
Hide resolved
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/AttachmentBuilder.kt
Show resolved
Hide resolved
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/AttachmentBuilder.kt
Outdated
Show resolved
Hide resolved
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/AttachmentBuilder.kt
Show resolved
Hide resolved
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/AttachmentBuilder.kt
Outdated
Show resolved
Hide resolved
prompt/prompt-model/src/commonMain/kotlin/ai/koog/prompt/dsl/AttachmentBuilder.kt
Outdated
Show resolved
Hide resolved
@EugeneTheDev could you also please check
So either Ollama doesn't support anything but base64 -- then we have to also write this in KDocs. |
…ges. Make API more unified and stable
e4b003a
to
1a3a957
Compare
This PR improves on the changes made in #195 and improves existing attachments API, making it more clean, straightforward and versatile. Support providing binary data directly for all attachment types to support more cases, e.g. mobile devices or server that need to retrieve attachment content their own custom way. Also refactor the code, making it more structured and extensible.
Fixes #269, fixes #253