Skip to content

Commit

Permalink
dependencies update
Browse files Browse the repository at this point in the history
  • Loading branch information
vsct-jburet committed Jan 5, 2025
1 parent 23e1afc commit a5642a9
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ internal object EnvironmentManager {

configuration.put(CommonConfigurationKeys.MODULE_NAME, "tockScript")

configuration.put(JSConfigurationKeys.TYPED_ARRAYS_ENABLED, true)

val environment =
KotlinCoreEnvironment.createForProduction(
disposable,
Expand Down
2 changes: 1 addition & 1 deletion bot/connector-teams/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<properties>
<microsoft.bot>4.14.3</microsoft.bot>
<nimbus-jose-jwt>9.41.1</nimbus-jose-jwt>
<nimbus-jose-jwt>9.48</nimbus-jose-jwt>
<gson>2.11.0</gson>
<minidev>2.5.1</minidev>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ enum class MediaType {
IMAGE, VIDEO;

companion object {
fun fromString(type: String): MediaType = when (type.toLowerCase()) {
fun fromString(type: String): MediaType = when (type.lowercase()) {
"image" -> IMAGE
"video" -> VIDEO
else -> throw IllegalArgumentException("Unsupported media type: $type")
Expand Down
25 changes: 15 additions & 10 deletions bot/engine/src/main/kotlin/engine/message/Sentence.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,30 @@ data class Sentence(
val messages: MutableList<GenericMessage> = mutableListOf(),
val userInterface: UserInterfaceType? = null,
override val delay: Long = 0,
@Transient private val nlpStatsProvider: (() -> NlpCallStats?)? = null
@Transient private val nlpStatsProvider: NlpStatsProvider? = null
) : Message {

companion object {
private val logger = KotlinLogging.logger {}

private fun toGenericMessage(message: ConnectorMessage): GenericMessage =
(
try {
message.toGenericMessage() ?: GenericMessage(message)
} catch (t: Throwable) {
logger.error(t)
GenericMessage(message)
}
).copy(connectorType = message.connectorType, connectorMessage = message)
try {
message.toGenericMessage() ?: GenericMessage(message)
} catch (t: Throwable) {
logger.error(t)
GenericMessage(message)
}
).copy(connectorType = message.connectorType, connectorMessage = message)
}

constructor(
text: String?,
messages: MutableList<ConnectorMessage> = mutableListOf(),
userInterface: UserInterfaceType? = null,
nlpStatsProvider: (() -> NlpCallStats?)? = null
nlpStatsProvider: NlpStatsProvider? = null
) :
this(text, messages.map { toGenericMessage(it) }.toMutableList(), userInterface, 0, nlpStatsProvider)
this(text, messages.map { toGenericMessage(it) }.toMutableList(), userInterface, 0, nlpStatsProvider)

override val eventType: EventType = EventType.sentence

Expand Down Expand Up @@ -120,3 +120,8 @@ data class Sentence(
return result
}
}

fun interface NlpStatsProvider {
operator fun invoke(): NlpCallStats?
}

47 changes: 47 additions & 0 deletions nlp/front/shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,53 @@

<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin}</version>

<executions>
<execution>
<id>kapt</id>
<goals>
<goal>kapt</goal>
</goals>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.litote.jackson</groupId>
<artifactId>jackson-generator</artifactId>
<version>${jackson-generator}</version>
</annotationProcessorPath>
<annotationProcessorPath>
<groupId>org.litote.kmongo</groupId>
<artifactId>kmongo-annotation-processor</artifactId>
<version>${kmongo}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</execution>

<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>

<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
25 changes: 14 additions & 11 deletions nlp/front/storage-mongo/src/test/kotlin/FaqSettingsMongoDAOTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,29 @@ class FaqSettingsMongoDAOTest : AbstractTest() {
@Test
fun `Save a FaqSettings`() {
faqSettingsDao.save(faqSettings)
val settings = faqSettingsDao.getFaqSettingsByApplicationId(applicationId)

assertEquals(
expected = faqSettings,
actual = faqSettingsDao.getFaqSettingsById(faqSettingsId),
message = "There should be something returned with an faqSettingsId"
expected = faqSettings.copy(_id = settings!!._id),
actual = settings,
message = "There should be something returned with an applicationId"
)
assertEquals(
expected = faqSettings,
actual = faqSettingsDao.getFaqSettingsByApplicationId(applicationId),
message = "There should be something returned with an applicationId"
expected = faqSettings.copy(_id = settings._id),
actual = faqSettingsDao.getFaqSettingsById(settings._id),
message = "There should be something returned with an faqSettingsId"
)
assertEquals(1, col.countDocuments())
}

@Test
fun `Update a FaqSettings`() {
faqSettingsDao.save(faqSettings)
val faqSettingsSaved = faqSettingsDao.getFaqSettingsById(faqSettingsId)
val faqSettingsSaved = faqSettingsDao.getFaqSettingsByApplicationId(applicationId)
val faqSettingsId = faqSettingsSaved!!._id

assertEquals(expected = faqSettings.satisfactionEnabled, actual = faqSettingsSaved?.satisfactionEnabled)
assertEquals(expected = faqSettings.satisfactionStoryId, actual = faqSettingsSaved?.satisfactionStoryId)
assertEquals(expected = faqSettings.satisfactionEnabled, actual = faqSettingsSaved.satisfactionEnabled)
assertEquals(expected = faqSettings.satisfactionStoryId, actual = faqSettingsSaved.satisfactionStoryId)

val faqSettings2 = faqSettings.copy(satisfactionEnabled = true, satisfactionStoryId = storyId)
faqSettingsDao.save(faqSettings2)
Expand All @@ -91,7 +93,8 @@ class FaqSettingsMongoDAOTest : AbstractTest() {
@Test
fun `Remove a FaqSettings`() {
faqSettingsDao.save(faqSettings)

val faqSettingsSaved = faqSettingsDao.getFaqSettingsByApplicationId(applicationId)
val faqSettingsId = faqSettingsSaved!!._id
faqSettingsDao.deleteFaqSettingsById(faqSettingsId)

assertEquals(
Expand All @@ -106,4 +109,4 @@ class FaqSettingsMongoDAOTest : AbstractTest() {
)
assertEquals(0, col.countDocuments())
}
}
}
2 changes: 1 addition & 1 deletion nlp/model/opennlp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<description>OpenNlp implementation of Tock NLP Model</description>

<properties>
<opennlp>2.4.0</opennlp>
<opennlp>2.5.2</opennlp>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion nlp/model/opennlp/src/main/kotlin/OpenNlpModelBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import ai.tock.shared.loadProperties
import mu.KotlinLogging
import opennlp.tools.ml.maxent.GISModel
import opennlp.tools.ml.maxent.GISTrainer
import opennlp.tools.ml.model.AbstractDataIndexer.CUTOFF_PARAM
import opennlp.tools.ml.model.Event
import opennlp.tools.ml.model.OnePassRealValueDataIndexer
import opennlp.tools.ml.model.TwoPassDataIndexer
Expand All @@ -42,6 +41,7 @@ import opennlp.tools.namefind.TokenNameFinderFactory
import opennlp.tools.util.ObjectStreamUtils
import opennlp.tools.util.Span
import opennlp.tools.util.TrainingParameters
import opennlp.tools.util.TrainingParameters.CUTOFF_PARAM
import java.time.Instant

/**
Expand Down
2 changes: 1 addition & 1 deletion nlp/model/sagemaker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<description>Sagemaker client for Tock NLP Model</description>

<properties>
<aws.version>2.28.7</aws.version>
<aws.version>2.29.43</aws.version>
</properties>

<dependencies>
Expand Down
69 changes: 34 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,62 +31,62 @@
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>

<kotlin>2.0.20</kotlin>
<coroutine>1.9.0</coroutine>
<kotlin>2.1.0</kotlin>
<coroutine>1.10.1</coroutine>

<slf4j>2.0.16</slf4j>
<logback>1.5.8</logback>
<logback>1.5.15</logback>

<kotlin-logging>3.0.5</kotlin-logging>

<kodein>4.1.0</kodein>
<kmongo>5.1.0</kmongo>
<jackson>2.17.2</jackson>
<jackson-databind>2.17.2</jackson-databind>
<jackson-module>2.17.2</jackson-module>
<kmongo>5.2.0</kmongo>
<jackson>2.18.2</jackson>
<jackson-databind>2.18.2</jackson-databind>
<jackson-module>2.18.2</jackson-module>
<jackson-module-loader>0.4.0</jackson-module-loader>
<jackson-data>0.4.0</jackson-data>
<jackson-generator>0.4.0</jackson-generator>
<klaxon>5.6</klaxon>
<vertx>4.5.10</vertx>
<vertx>4.5.11</vertx>
<retrofit>2.11.0</retrofit>
<okhttp>4.12.0</okhttp>
<okhttp-signpost>1.1.0</okhttp-signpost>
<signpost-core>1.2.1.2</signpost-core>
<circuitbreaker>1.7.1</circuitbreaker>
<guava>33.3.1-jre</guava>
<google-auth>1.36.0</google-auth>
<google-http-client>1.45.0</google-http-client>
<guava>33.4.0-jre</guava>
<google-auth>1.37.0</google-auth>
<google-http-client>1.45.3</google-http-client>
<jasypt>1.9.3</jasypt>
<commons-csv>1.11.0</commons-csv>
<commons-text>1.12.0</commons-text>
<commons-csv>1.12.0</commons-csv>
<commons-text>1.13.0</commons-text>
<emoji>5.1.1</emoji>
<commons-codec>1.17.1</commons-codec>
<commons-lang>3.17.0</commons-lang>
<commonmark>0.23.0</commonmark>
<json>20240303</json>
<commonmark>0.24.0</commonmark>
<json>20241224</json>
<httpclient>4.5.14</httpclient>
<simmetrics>4.1.1</simmetrics>
<batik>1.12</batik>
<google>26.47.0</google>
<aws-sdk>1.12.772</aws-sdk>
<pac4j>5.7.3</pac4j>
<vertx-pac4j>6.0.2</vertx-pac4j>
<google>26.52.0</google>
<aws-sdk>1.12.780</aws-sdk>
<pac4j>5.7.7</pac4j>
<vertx-pac4j>6.0.3</vertx-pac4j>
<graphql-kotlin>6.3.0</graphql-kotlin>

<junit-jupiter>5.11.0</junit-jupiter>
<testcontainer>1.20.1</testcontainer>
<junit-jupiter>5.11.4</junit-jupiter>
<testcontainer>1.20.4</testcontainer>

<mockk>1.13.12</mockk>
<mockk>1.13.14</mockk>
<assertj>3.22.0</assertj>
<byte-buddy>1.15.1</byte-buddy>
<byte-buddy>1.15.11</byte-buddy>
<atrium>0.15.0</atrium>
<serialization>1.6.2</serialization>

<plugin.surefire>3.2.5</plugin.surefire>
<plugin.surefire>3.5.0</plugin.surefire>
<plugin.source>3.3.1</plugin.source>
<plugin.release>3.0.1</plugin.release>
<plugin.gpg>3.2.4</plugin.gpg>
<plugin.release>3.1.1</plugin.release>
<plugin.gpg>3.2.6</plugin.gpg>
<plugin.nexus-staging>1.6.13</plugin.nexus-staging>
<plugin.dokka>1.9.20</plugin.dokka>
<plugin.assembly>3.4.2</plugin.assembly>
Expand All @@ -101,12 +101,12 @@
<plugin.gitid>4.9.10</plugin.gitid>
<plugin.ktlint>1.15.2</plugin.ktlint>

<kotlin.compiler.jvmTarget>11</kotlin.compiler.jvmTarget>
<kotlin.compiler.jvmTarget>17</kotlin.compiler.jvmTarget>

<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>

<node>v20.13.1</node>
<node>v20.18.1</node>
</properties>

<modules>
Expand All @@ -128,11 +128,6 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>${kotlin}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
Expand Down Expand Up @@ -712,6 +707,10 @@
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin}</version>
<configuration>
<languageVersion>1.9</languageVersion>
<apiVersion>1.9</apiVersion>
</configuration>

<executions>
<execution>
Expand Down
2 changes: 1 addition & 1 deletion util/gcp-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<url>http://maven.apache.org</url>

<properties>
<gcp-secretmanager>2.49.0</gcp-secretmanager>
<gcp-secretmanager>2.55.0</gcp-secretmanager>
</properties>

<build>
Expand Down

0 comments on commit a5642a9

Please sign in to comment.