From d194e458e762003d0bcb900e8151b082db1d6cd6 Mon Sep 17 00:00:00 2001 From: Sasindu Alahakoon Date: Sat, 26 Jul 2025 12:51:33 +0530 Subject: [PATCH 1/2] [Automated] Update the toml files --- ballerina/Ballerina.toml | 7 ++++--- ballerina/Dependencies.toml | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index bc9b99a..ba4c6d3 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -3,10 +3,11 @@ authors = ["Ballerina"] distribution = "2201.12.0" keywords = ["AI", "Agent", "Ollama", "Model", "Provider"] license = ["Apache-2.0"] +icon="icon.png" name = "ai.ollama" org = "ballerinax" repository = "https://github.com/ballerina-platform/module-ballerinax-ai.ollama" -version = "1.0.1" +version = "1.1.0" [platform.java21] graalvmCompatible = true @@ -14,5 +15,5 @@ graalvmCompatible = true [[platform.java21.dependency]] groupId = "io.ballerina.lib" artifactId = "ai.ollama-native" -version = "1.0.1" -path = "../native/build/libs/ai.ollama-native-1.0.1-SNAPSHOT.jar" +version = "1.1.0" +path = "../native/build/libs/ai.ollama-native-1.1.0-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 8f6f92a..1894cfd 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.12.0" +distribution-version = "2201.12.7" [[package]] org = "ballerina" @@ -394,7 +394,7 @@ dependencies = [ [[package]] org = "ballerinax" name = "ai.ollama" -version = "1.0.1" +version = "1.1.0" dependencies = [ {org = "ballerina", name = "ai"}, {org = "ballerina", name = "constraint"}, From d437711054e673f650e690ea835fb97cb29fd6c5 Mon Sep 17 00:00:00 2001 From: Sasindu Alahakoon Date: Sat, 26 Jul 2025 12:52:30 +0530 Subject: [PATCH 2/2] Update icon and generate label --- ballerina/CompilerPlugin.toml | 2 +- ballerina/icon.png | Bin 0 -> 2345 bytes ballerina/provider.bal | 3 ++- build-config/resources/Ballerina.toml | 1 + gradle.properties | 2 +- 5 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 ballerina/icon.png diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 40d09fd..2a9bb40 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,7 +3,7 @@ id = "ai-ollama-compiler-plugin" class = "io.ballerina.lib.ai.ollama.AiOllamaCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/ai.ollama-compiler-plugin-1.0.1-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/ai.ollama-compiler-plugin-1.1.0-SNAPSHOT.jar" [[dependency]] path = "../compiler-plugin/build/libs/ballerina-to-openapi-2.3.0.jar" diff --git a/ballerina/icon.png b/ballerina/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..68d5be87779244dc9e09d122cc1c3fd1ba431789 GIT binary patch literal 2345 zcmV+^3D)+BP)002t}1^@s6I8J)%00004b3#c}2nYxW zd@uvUAVO+~3@L=Wc)dO>TB)?#z78%)K*n=A3hX5Eos*GGHz6KJYAXQe+MvP6D0* z`hj)83gD12;x3G@0ULl3b!`JKu9^Fighz940Or@sT^RcT>#>D3uW#4H{hbE9p8^Ne z#9a!HkS}m5^lp)Pry^6n5%;5!c}wF^Y~lU_-0aA|HZu2h4vw3Fzd7<}M&>Ss8_5dQ z59|rFAcJP!`v_={#M=(^srH{uc=rYd)V*6G@m9kB$O?6baqkrDCwyWg-qRdyn>+7) z>fV1N@s`H^*aFWp?oU8e2=o3gBXQrM+Fb**8uyQP$aYW_!X2tq298nb0c5>MF@)${ zCXTPj>Em7w3>)befi0@c5mg8$RH+PnQKeS_TUFjuzy(HnHZT#`Y~-~f3gi*MG++v{ z%Y6jA0=$XnQ7I-O8;gnOReAt;6_{h>ReH0kLaz&tILhpYJsrA|d$W=0q!(&^^(EzI zC-u49vkB!@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Oa&57doo zu`MUl>mpu4ezOwtOjWH$E9pXf$Jv+YT0&c#L3uwsAVcH zR3saS91=YSXv6+Nv|vYT5gp?wm5v?fITjd1-2NtJg;p*ySO=?g8CO^{K+CNovArlV zSbEpfW}EQ>9Rr^i@|i)A!P19j-w$3iJ4!oRiVT+i^`d6~Y|e+$XTc&B^$$oC_Kq|O z_EPC!dwh|>dRwJ~cabK;kt+R8XvHFfwNj-|z_w*KJ37h!%pOS4ZV>(t@CTY?U84qR P00000NkvXXu0mjf>f~7o literal 0 HcmV?d00001 diff --git a/ballerina/provider.bal b/ballerina/provider.bal index 7398de7..d239183 100644 --- a/ballerina/provider.bal +++ b/ballerina/provider.bal @@ -73,7 +73,8 @@ public isolated client class ModelProvider { # + prompt - The prompt to use in the chat messages # + td - Type descriptor specifying the expected return type format # + return - Generates a value that belongs to the type, or an error if generation fails - isolated remote function generate(ai:Prompt prompt, typedesc td = <>) returns td|ai:Error = @java:Method { + isolated remote function generate(ai:Prompt prompt, @display {label: "Expected type"} typedesc td = <>) + returns td|ai:Error = @java:Method { 'class: "io.ballerina.lib.ai.ollama.Generator" } external; diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index cc391f7..4b48fd6 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -3,6 +3,7 @@ authors = ["Ballerina"] distribution = "2201.12.0" keywords = ["AI", "Agent", "Ollama", "Model", "Provider"] license = ["Apache-2.0"] +icon="icon.png" name = "ai.ollama" org = "ballerinax" repository = "https://github.com/ballerina-platform/module-ballerinax-ai.ollama" diff --git a/gradle.properties b/gradle.properties index f07536f..5bbc77c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina.lib -version=1.0.1-SNAPSHOT +version=1.1.0-SNAPSHOT ballerinaLangVersion=2201.12.0 shadowJarPluginVersion=8.1.1