Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: xebia-functional/xef
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.0.1
Choose a base ref
...
head repository: xebia-functional/xef
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.0.2
Choose a head ref

Commits on Jun 6, 2023

  1. Bump org.postgresql:postgresql from 42.5.1 to 42.6.0 (#163)

    Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.5.1 to 42.6.0.
    - [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
    - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
    - [Commits](pgjdbc/pgjdbc@REL42.5.1...REL42.6.0)
    
    ---
    updated-dependencies:
    - dependency-name: org.postgresql:postgresql
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8117a2c View commit details
  2. Bump io.kotest.extensions:kotest-assertions-arrow from 1.3.0 to 1.3.3 (

    …#164)
    
    Bumps [io.kotest.extensions:kotest-assertions-arrow](https://github.com/kotest/kotest-extensions-arrow) from 1.3.0 to 1.3.3.
    - [Commits](https://github.com/kotest/kotest-extensions-arrow/commits)
    
    ---
    updated-dependencies:
    - dependency-name: io.kotest.extensions:kotest-assertions-arrow
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 6, 2023
    Copy the full SHA
    797ae34 View commit details
  3. Copy the full SHA
    62956e6 View commit details
  4. Bump io.github.oshai:kotlin-logging from 4.0.0-beta-22 to 4.0.0-beta-…

    …29 (#161)
    
    * Bump io.github.oshai:kotlin-logging from 4.0.0-beta-22 to 4.0.0-beta-29
    
    Bumps [io.github.oshai:kotlin-logging](https://github.com/oshai/kotlin-logging) from 4.0.0-beta-22 to 4.0.0-beta-29.
    - [Release notes](https://github.com/oshai/kotlin-logging/releases)
    - [Changelog](https://github.com/oshai/kotlin-logging/blob/master/ChangeLog.md)
    - [Commits](oshai/kotlin-logging@4.0.0-beta-22...4.0.0-beta-29)
    
    ---
    updated-dependencies:
    - dependency-name: io.github.oshai:kotlin-logging
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * Change package name in imports
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: franciscodr <francisco.d@47deg.com>
    dependabot[bot] and franciscodr authored Jun 6, 2023
    Copy the full SHA
    7471dca View commit details

Commits on Jun 7, 2023

  1. Bump arrowGradle from 0.11.0-alpha.1 to 0.12.0-rc.3 (#162)

    Bumps `arrowGradle` from 0.11.0-alpha.1 to 0.12.0-rc.3.
    
    Updates `io.arrow-kt.arrow-gradle-config-nexus` from 0.11.0-alpha.1 to 0.12.0-rc.3
    - [Release notes](https://github.com/arrow-kt/arrow-gradle-config/releases)
    - [Commits](arrow-kt/arrow-gradle-config@0.11.0-alpha.1...0.12.0-rc.3)
    
    Updates `io.arrow-kt.arrow-gradle-config-publish` from 0.11.0-alpha.1 to 0.12.0-rc.3
    - [Release notes](https://github.com/arrow-kt/arrow-gradle-config/releases)
    - [Commits](arrow-kt/arrow-gradle-config@0.11.0-alpha.1...0.12.0-rc.3)
    
    ---
    updated-dependencies:
    - dependency-name: io.arrow-kt.arrow-gradle-config-nexus
      dependency-type: direct:production
      update-type: version-update:semver-minor
    - dependency-name: io.arrow-kt.arrow-gradle-config-publish
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Francisco Diaz <francisco.d@47deg.com>
    dependabot[bot] and franciscodr authored Jun 7, 2023
    Copy the full SHA
    9cd1023 View commit details

Commits on Jun 8, 2023

  1. Copy the full SHA
    4fcfca5 View commit details
  2. Remove Schedule (#177)

    nomisRev authored Jun 8, 2023
    Copy the full SHA
    dc70a10 View commit details
  3. Revert "Scala prompt templating (#157)" (#176)

    This reverts commit c6769a2.
    necosta authored Jun 8, 2023
    Copy the full SHA
    cc1a1c1 View commit details

Commits on Jun 9, 2023

  1. First approach of loading GPT4All models locally (#166)

    * feat: first version of GPT4All Kotlin/JVM bindings
    * feat: add example using GPTJ and adjust parameters
    * fix: better prompt generation on GPT4All
    * refactor: move configuration out of examples project, add some documentation and minor refactor
    * fix: add dependency on examples from xefGpt4All
    * feat: improve domain on GPT4All
    * demo: surround with either instead of ai before integrating
    * feat: add openai-like models to GPT4All
    * fix: remove unused error
    * feat: add darwin-x86-64 platform
    * refactor: apply suggestion from @necosta
    * demo: surround with recover to get also chat errors by console
    realdavidvega authored Jun 9, 2023
    Copy the full SHA
    dd386b8 View commit details

Commits on Jun 12, 2023

  1. Remove Arrow Resource from Core (#178)

    Co-authored-by: yago <Yawolf@users.noreply.github.com>
    nomisRev and Yawolf authored Jun 12, 2023
    Copy the full SHA
    c4f28cb View commit details

Commits on Jun 13, 2023

  1. Bump app.softwork:kotlinx-uuid-core from 0.0.18 to 0.0.20 (#182)

    Bumps [app.softwork:kotlinx-uuid-core](https://github.com/hfhbd/kotlinx-uuid) from 0.0.18 to 0.0.20.
    - [Release notes](https://github.com/hfhbd/kotlinx-uuid/releases)
    - [Commits](hfhbd/kotlinx-uuid@v0.0.18...v0.0.20)
    
    ---
    updated-dependencies:
    - dependency-name: app.softwork:kotlinx-uuid-core
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 13, 2023
    Copy the full SHA
    b22efc0 View commit details
  2. Bump ktor from 2.3.0 to 2.3.1 (#183)

    Bumps `ktor` from 2.3.0 to 2.3.1.
    
    Updates `io.ktor:ktor-client-core` from 2.3.0 to 2.3.1
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.0...2.3.1)
    
    Updates `io.ktor:ktor-client-js` from 2.3.0 to 2.3.1
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.0...2.3.1)
    
    Updates `io.ktor:ktor-client-cio` from 2.3.0 to 2.3.1
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.0...2.3.1)
    
    Updates `io.ktor:ktor-client-winhttp` from 2.3.0 to 2.3.1
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.0...2.3.1)
    
    Updates `io.ktor:ktor-client-content-negotiation` from 2.3.0 to 2.3.1
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.0...2.3.1)
    
    Updates `io.ktor:ktor-serialization-kotlinx-json` from 2.3.0 to 2.3.1
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.0...2.3.1)
    
    ---
    updated-dependencies:
    - dependency-name: io.ktor:ktor-client-core
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-js
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-cio
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-winhttp
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-content-negotiation
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-serialization-kotlinx-json
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Yago Cervantes <1420230+Yawolf@users.noreply.github.com>
    dependabot[bot] and Yawolf authored Jun 13, 2023
    Copy the full SHA
    3e10313 View commit details
  3. Bump kotlin from 1.8.21 to 1.8.22 (#184)

    Bumps `kotlin` from 1.8.21 to 1.8.22.
    
    Updates `org.jetbrains.kotlin.multiplatform` from 1.8.21 to 1.8.22
    - [Release notes](https://github.com/JetBrains/kotlin/releases)
    - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
    - [Commits](JetBrains/kotlin@v1.8.21...v1.8.22)
    
    Updates `org.jetbrains.kotlin.jvm` from 1.8.21 to 1.8.22
    - [Release notes](https://github.com/JetBrains/kotlin/releases)
    - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
    - [Commits](JetBrains/kotlin@v1.8.21...v1.8.22)
    
    Updates `org.jetbrains.kotlin.js` from 1.8.21 to 1.8.22
    - [Release notes](https://github.com/JetBrains/kotlin/releases)
    - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
    - [Commits](JetBrains/kotlin@v1.8.21...v1.8.22)
    
    Updates `org.jetbrains.kotlin.plugin.serialization` from 1.8.21 to 1.8.22
    - [Release notes](https://github.com/JetBrains/kotlin/releases)
    - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.8.22/ChangeLog.md)
    - [Commits](JetBrains/kotlin@v1.8.21...v1.8.22)
    
    ---
    updated-dependencies:
    - dependency-name: org.jetbrains.kotlin.multiplatform
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: org.jetbrains.kotlin.jvm
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: org.jetbrains.kotlin.js
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: org.jetbrains.kotlin.plugin.serialization
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Yago Cervantes <1420230+Yawolf@users.noreply.github.com>
    dependabot[bot] and Yawolf authored Jun 13, 2023
    Copy the full SHA
    de41e40 View commit details
  4. Bump com.apptasticsoftware:rssreader from 3.4.4 to 3.4.5 (#185)

    Bumps [com.apptasticsoftware:rssreader](https://github.com/w3stling/rssreader) from 3.4.4 to 3.4.5.
    - [Release notes](https://github.com/w3stling/rssreader/releases)
    - [Commits](w3stling/rssreader@v3.4.4...v3.4.5)
    
    ---
    updated-dependencies:
    - dependency-name: com.apptasticsoftware:rssreader
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Yago Cervantes <1420230+Yawolf@users.noreply.github.com>
    dependabot[bot] and Yawolf authored Jun 13, 2023
    Copy the full SHA
    2a70370 View commit details
  5. Bump com.diffplug.spotless from 6.18.0 to 6.19.0 (#181)

    * Bump com.diffplug.spotless from 6.18.0 to 6.19.0
    
    Bumps com.diffplug.spotless from 6.18.0 to 6.19.0.
    
    ---
    updated-dependencies:
    - dependency-name: com.diffplug.spotless
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * Format
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: yago <Yawolf@users.noreply.github.com>
    dependabot[bot] and Yawolf authored Jun 13, 2023
    Copy the full SHA
    35ada15 View commit details
  6. Remove mock code from main (#172)

    * Remove mock code from main
    
    * Remove removed import
    
    ---------
    
    Co-authored-by: Yago Cervantes <1420230+Yawolf@users.noreply.github.com>
    nomisRev and Yawolf authored Jun 13, 2023
    Copy the full SHA
    db36100 View commit details
  7. Deleting Arrow STM (#179)

    * Deleting Arrow STM
    
    * Format
    
    * emptyMap() better than mapOf()
    
    ---------
    
    Co-authored-by: yago <Yawolf@users.noreply.github.com>
    Yawolf and Yawolf authored Jun 13, 2023
    Copy the full SHA
    7668a51 View commit details
  8. Cu 861mwhnjx split kotlinx serialization (#170)

    * Split KotlinX Serialization into its own module
    
    * Remove unrelated changes
    
    * Add technical documentation
    
    * Remove SerializationStrategy
    
    * SpotlessApply
    
    * Fixes after merge
    
    ---------
    
    Co-authored-by: yago <Yawolf@users.noreply.github.com>
    nomisRev and Yawolf authored Jun 13, 2023
    Copy the full SHA
    66c00eb View commit details
  9. Mock AI (#180)

    * Mock AI response
    
    * Two ways to mock
    
    * Fix NotImplementErrors
    
    * Make mock embeddings return 0
    
    * Format code
    
    ---------
    
    Co-authored-by: Francisco Diaz <francisco.d@47deg.com>
    serras and franciscodr authored Jun 13, 2023
    Copy the full SHA
    ff49b65 View commit details

Commits on Jun 16, 2023

  1. Gpt 3.5 turbo 0613 serialization support (#186)

    * Progress toward openai function support
    
    * more progress, but request still failing
    
    * serialization working through open ai functions without the need of threats
    
    * misc fixes
    raulraja authored Jun 16, 2023
    Copy the full SHA
    58c6340 View commit details

Commits on Jun 19, 2023

  1. Copy the full SHA
    ac09acf View commit details
  2. Extension Methods to Instance Methods (#187)

    * Extension Methods to Instance Methods
    
    * Adding missing file
    
    * Fixes after merge
    
    ---------
    
    Co-authored-by: yago <Yawolf@users.noreply.github.com>
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    3 people authored Jun 19, 2023
    Copy the full SHA
    c345819 View commit details

Commits on Jun 20, 2023

  1. Bump org.assertj:assertj-core from 3.11.1 to 3.24.2 (#188)

    Bumps org.assertj:assertj-core from 3.11.1 to 3.24.2.
    
    ---
    updated-dependencies:
    - dependency-name: org.assertj:assertj-core
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 20, 2023
    Copy the full SHA
    0a20c60 View commit details
  2. Bump io.kotest.extensions:kotest-extensions-testcontainers (#189)

    Bumps [io.kotest.extensions:kotest-extensions-testcontainers](https://github.com/kotest/kotest-extensions-testcontainers) from 1.3.4 to 2.0.0.
    - [Commits](https://github.com/kotest/kotest-extensions-testcontainers/commits)
    
    ---
    updated-dependencies:
    - dependency-name: io.kotest.extensions:kotest-extensions-testcontainers
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Yago Cervantes <1420230+Yawolf@users.noreply.github.com>
    dependabot[bot] and Yawolf authored Jun 20, 2023
    Copy the full SHA
    9e21033 View commit details
  3. Bump ch.qos.logback:logback-classic from 1.4.6 to 1.4.8 (#190)

    Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.6 to 1.4.8.
    - [Commits](qos-ch/logback@v_1.4.6...v_1.4.8)
    
    ---
    updated-dependencies:
    - dependency-name: ch.qos.logback:logback-classic
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Yago Cervantes <1420230+Yawolf@users.noreply.github.com>
    dependabot[bot] and Yawolf authored Jun 20, 2023
    Copy the full SHA
    d99d601 View commit details
  4. Bump org.typelevel:munit-cats-effect-3_3 from 1.0.5 to 1.0.7 (#191)

    Bumps [org.typelevel:munit-cats-effect-3_3](https://github.com/typelevel/munit-cats-effect) from 1.0.5 to 1.0.7.
    - [Release notes](https://github.com/typelevel/munit-cats-effect/releases)
    - [Commits](typelevel/munit-cats-effect@v1.0.5...v1.0.7)
    
    ---
    updated-dependencies:
    - dependency-name: org.typelevel:munit-cats-effect-3_3
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 20, 2023
    Copy the full SHA
    ecfaa2c View commit details
  5. Bump org.scalameta:munit_3 from 0.7.28 to 0.7.29 (#192)

    Bumps [org.scalameta:munit_3](https://github.com/scalameta/munit) from 0.7.28 to 0.7.29.
    - [Release notes](https://github.com/scalameta/munit/releases)
    - [Commits](scalameta/munit@v0.7.28...v0.7.29)
    
    ---
    updated-dependencies:
    - dependency-name: org.scalameta:munit_3
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Yago Cervantes <1420230+Yawolf@users.noreply.github.com>
    dependabot[bot] and Yawolf authored Jun 20, 2023
    Copy the full SHA
    c257766 View commit details

Commits on Jun 21, 2023

  1. Copy the full SHA
    d125f98 View commit details
  2. Update LocalVectorStore.kt (#194)

    Fix name collision
    diesalbla authored Jun 21, 2023
    Copy the full SHA
    e256c62 View commit details

Commits on Jun 22, 2023

  1. Local-Vector-Stores / addStores: make one update. (#195)

    * Local-Vector-Stores / addStores: make one update.
    
    Instead of having a sequence of updates to the Atomic State,
    it may be more efficient to have a single bulk update.
    It would also be more transactional.
    
    * Update core/src/commonMain/kotlin/com/xebia/functional/xef/vectorstores/LocalVectorStore.kt
    
    ---------
    
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    diesalbla and nomisRev authored Jun 22, 2023
    Copy the full SHA
    3a7a08d View commit details

Commits on Jun 23, 2023

  1. TokenTextSplitter Ref: extract method, use range. (#198)

    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    diesalbla and nomisRev authored Jun 23, 2023
    Copy the full SHA
    1ad3934 View commit details
  2. OpenAIEmbeddings - Refactor (#199)

    Nest logic internally. Use nested functions.
    
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    diesalbla and nomisRev authored Jun 23, 2023
    Copy the full SHA
    38277ad View commit details

Commits on Jun 27, 2023

  1. Bump org.jetbrains.dokka from 1.8.10 to 1.8.20 (#204)

    Bumps [org.jetbrains.dokka](https://github.com/Kotlin/dokka) from 1.8.10 to 1.8.20.
    - [Release notes](https://github.com/Kotlin/dokka/releases)
    - [Commits](Kotlin/dokka@v1.8.10...v1.8.20)
    
    ---
    updated-dependencies:
    - dependency-name: org.jetbrains.dokka
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 27, 2023
    Copy the full SHA
    ad1e060 View commit details
  2. Bump org.testcontainers:postgresql from 1.17.6 to 1.18.3 (#201)

    Bumps [org.testcontainers:postgresql](https://github.com/testcontainers/testcontainers-java) from 1.17.6 to 1.18.3.
    - [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
    - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
    - [Commits](testcontainers/testcontainers-java@1.17.6...1.18.3)
    
    ---
    updated-dependencies:
    - dependency-name: org.testcontainers:postgresql
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 27, 2023
    Copy the full SHA
    acdee77 View commit details
  3. Bump lucene from 9.6.0 to 9.7.0 (#203)

    Bumps `lucene` from 9.6.0 to 9.7.0.
    
    Updates `org.apache.lucene:lucene-core` from 9.6.0 to 9.7.0
    
    Updates `org.apache.lucene:lucene-queries` from 9.6.0 to 9.7.0
    
    ---
    updated-dependencies:
    - dependency-name: org.apache.lucene:lucene-core
      dependency-type: direct:production
      update-type: version-update:semver-minor
    - dependency-name: org.apache.lucene:lucene-queries
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    dependabot[bot] and nomisRev authored Jun 27, 2023
    Copy the full SHA
    f745a2d View commit details
  4. Copy the full SHA
    d591d6b View commit details
  5. Copy the full SHA
    837c13a View commit details
  6. Bump com.theokanning.openai-gpt3-java:service from 0.12.0 to 0.14.0 (#…

    …202)
    
    Bumps [com.theokanning.openai-gpt3-java:service](https://github.com/theokanning/openai-java) from 0.12.0 to 0.14.0.
    - [Release notes](https://github.com/theokanning/openai-java/releases)
    - [Commits](TheoKanning/openai-java@0.12.0...0.14.0)
    
    ---
    updated-dependencies:
    - dependency-name: com.theokanning.openai-gpt3-java:service
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    dependabot[bot] and nomisRev authored Jun 27, 2023
    Copy the full SHA
    75d9393 View commit details
  7. CoreAIScope: Refactor code (#208)

    - Use nested functions to reduce the parameters being passed
    - Extract function for the fall-back-to-case.
    diesalbla authored Jun 27, 2023
    Copy the full SHA
    2861369 View commit details
  8. Adding xef.java module (#197)

    Co-authored-by: yago <Yawolf@users.noreply.github.com>
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    3 people authored Jun 27, 2023
    Copy the full SHA
    8c8f592 View commit details
  9. Copy the full SHA
    f70b288 View commit details

Commits on Jun 28, 2023

  1. Java Future API - remove JDK19 restriction support JDK8 (#210)

    * Parameterise ExecutorService, and address PR feedback
    * Remove Loom dependency, and clean-up future creation
    nomisRev authored Jun 28, 2023
    Copy the full SHA
    76420f6 View commit details

Commits on Jun 29, 2023

  1. Copy the full SHA
    005eda8 View commit details

Commits on Jun 30, 2023

  1. Copy the full SHA
    6b4b66a View commit details
  2. Generic AI client and models + open-ai client lib (#196)

    * Generic AI client and models with open-ai client impl from https://github.com/aallam/openai-kotlin
    
    * type LLM models based on their capabilities and type the operations
    
    * add token as parameter to `openAI` fn falling back to env variable
    
    * add config as optional parameter
    
    * remove old config
    
    * adapt to latest changes from main and new java module
    
    * have openai be its own module that depends on xef-core. kotlin, scala and java depends on openai module for defaults. xef core does not depend on open ai
    
    * fix bug in scala fn name for serialization
    
    * make AIClient : AutoCloseable
    
    * Rename enum cases
    
    * Rename to TEXT_EMBEDDING_ADA_002
    
    * Fix AIClient close expectation
    
    * fix for overriding user provided service
    
    * remove star import
    
    ---------
    
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    raulraja and nomisRev authored Jun 30, 2023
    Copy the full SHA
    c0af078 View commit details

Commits on Jul 3, 2023

  1. CU-865cn6kqn Model capabilities and AIScope simplification. (#214)

    * Generic AI client and models with open-ai client impl from https://github.com/aallam/openai-kotlin
    
    * type LLM models based on their capabilities and type the operations
    
    * add token as parameter to `openAI` fn falling back to env variable
    
    * add config as optional parameter
    
    * remove old config
    
    * adapt to latest changes from main and new java module
    
    * have openai be its own module that depends on xef-core. kotlin, scala and java depends on openai module for defaults. xef core does not depend on open ai
    
    * fix bug in scala fn name for serialization
    
    * make AIClient : AutoCloseable
    
    * Rename enum cases
    
    * Rename to TEXT_EMBEDDING_ADA_002
    
    * Fix AIClient close expectation
    
    * Progress with models
    
    * Refactor to have models typed and increase ergonomics
    
    * Loading embeddings and tokenizer from huggingface, dynamic loading of local models. Local models can be use in the AI DSL and interleaved with any model.
    
    * remove non used repositories
    
    * Fix functions model to GPT_3_5_TURBO_FUNCTIONS and example without AI block and manual component construction
    
    * remove unused import
    
    * Small suggestions
    
    * More small suggestions
    
    - Replace blocks with equals / single expressions
    
    ---------
    
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    Co-authored-by: Diego E. Alonso <diego.e.a@47deg.com>
    3 people authored Jul 3, 2023
    Copy the full SHA
    b1ebeea View commit details
  2. GPT4All Java Bindings and supported models list (#216)

    * Generic AI client and models with open-ai client impl from https://github.com/aallam/openai-kotlin
    
    * type LLM models based on their capabilities and type the operations
    
    * add token as parameter to `openAI` fn falling back to env variable
    
    * add config as optional parameter
    
    * remove old config
    
    * adapt to latest changes from main and new java module
    
    * have openai be its own module that depends on xef-core. kotlin, scala and java depends on openai module for defaults. xef core does not depend on open ai
    
    * fix bug in scala fn name for serialization
    
    * make AIClient : AutoCloseable
    
    * Rename enum cases
    
    * Rename to TEXT_EMBEDDING_ADA_002
    
    * Fix AIClient close expectation
    
    * Progress with models
    
    * Refactor to have models typed and increase ergonomics
    
    * Loading embeddings and tokenizer from huggingface, dynamic loading of local models. Local models can be use in the AI DSL and interleaved with any model.
    
    * remove non used repositories
    
    * Fix functions model to GPT_3_5_TURBO_FUNCTIONS and example without AI block and manual component construction
    
    * remove unused import
    
    * GPT4All Java Bindings and supported models list + std out streaming support
    
    ---------
    
    Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
    raulraja and nomisRev authored Jul 3, 2023
    Copy the full SHA
    b47e93e View commit details
  3. Bump com.aallam.openai:openai-client from 3.3.0 to 3.3.1 (#220)

    Bumps [com.aallam.openai:openai-client](https://github.com/Aallam/openai-kotlin) from 3.3.0 to 3.3.1.
    - [Release notes](https://github.com/Aallam/openai-kotlin/releases)
    - [Changelog](https://github.com/aallam/openai-kotlin/blob/main/CHANGELOG.md)
    - [Commits](aallam/openai-kotlin@3.3.0...3.3.1)
    
    ---
    updated-dependencies:
    - dependency-name: com.aallam.openai:openai-client
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Raúl Raja Martínez <raulraja@gmail.com>
    dependabot[bot] and raulraja authored Jul 3, 2023
    Copy the full SHA
    d644199 View commit details
  4. Bump org.apache.pdfbox:pdfbox from 2.0.28 to 2.0.29 (#217)

    Bumps org.apache.pdfbox:pdfbox from 2.0.28 to 2.0.29.
    
    ---
    updated-dependencies:
    - dependency-name: org.apache.pdfbox:pdfbox
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Raúl Raja Martínez <raulraja@gmail.com>
    dependabot[bot] and raulraja authored Jul 3, 2023
    Copy the full SHA
    c858360 View commit details
  5. Bump ktor from 2.3.1 to 2.3.2 (#218)

    Bumps `ktor` from 2.3.1 to 2.3.2.
    
    Updates `io.ktor:ktor-client-core` from 2.3.1 to 2.3.2
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.1...2.3.2)
    
    Updates `io.ktor:ktor-client-js` from 2.3.1 to 2.3.2
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.1...2.3.2)
    
    Updates `io.ktor:ktor-client-cio` from 2.3.1 to 2.3.2
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.1...2.3.2)
    
    Updates `io.ktor:ktor-client-winhttp` from 2.3.1 to 2.3.2
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.1...2.3.2)
    
    Updates `io.ktor:ktor-client-content-negotiation` from 2.3.1 to 2.3.2
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.1...2.3.2)
    
    Updates `io.ktor:ktor-serialization-kotlinx-json` from 2.3.1 to 2.3.2
    - [Release notes](https://github.com/ktorio/ktor/releases)
    - [Changelog](https://github.com/ktorio/ktor/blob/main/CHANGELOG.md)
    - [Commits](ktorio/ktor@2.3.1...2.3.2)
    
    ---
    updated-dependencies:
    - dependency-name: io.ktor:ktor-client-core
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-js
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-cio
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-winhttp
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-client-content-negotiation
      dependency-type: direct:production
      update-type: version-update:semver-patch
    - dependency-name: io.ktor:ktor-serialization-kotlinx-json
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Raúl Raja Martínez <raulraja@gmail.com>
    dependabot[bot] and raulraja authored Jul 3, 2023
    Copy the full SHA
    2fb2eef View commit details
Showing with 5,411 additions and 2,418 deletions.
  1. +23 −3 .github/workflows/build.yml
  2. +1 −1 .github/workflows/publish-development-version.yml
  3. +1 −1 .github/workflows/publish.yml
  4. +2 −0 .gitignore
  5. +22 −2 README.md
  6. +63 −0 build.gradle.kts
  7. +1 −1 buildSrc/build.gradle.kts
  8. +49 −0 buildSrc/src/main/kotlin/JavaPublishingConventionsPlugin.kt
  9. +51 −0 buildSrc/src/main/kotlin/Predef.kt
  10. +0 −15 buildSrc/src/main/kotlin/ScalaDocumentationPlugin.kt
  11. +62 −0 buildSrc/src/main/kotlin/ScalaPublishingConventionsPlugin.kt
  12. +1 −0 buildSrc/src/main/kotlin/xef-java-publishing-conventions.gradle.kts
  13. +0 −1 buildSrc/src/main/kotlin/xef-scala-documentation.gradle.kts
  14. +1 −0 buildSrc/src/main/kotlin/xef-scala-publishing-conventions.gradle.kts
  15. +28 −0 core/TECHNICAL.MD
  16. +13 −37 core/build.gradle.kts
  17. +19 −26 core/src/commonMain/kotlin/com/xebia/functional/xef/AIError.kt
  18. +5 −180 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/AI.kt
  19. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/AiDsl.kt
  20. +162 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/CoreAIScope.kt
  21. +14 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/Description.kt
  22. +0 −185 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/DeserializerLLMAgent.kt
  23. +0 −142 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/ImageGenerationAgent.kt
  24. +0 −274 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/LLMAgent.kt
  25. +71 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/PromptConfiguration.kt
  26. +0 −31 core/src/commonMain/kotlin/com/xebia/functional/xef/auto/Solution.kt
  27. +2 −1 core/src/commonMain/kotlin/com/xebia/functional/xef/embeddings/Embeddings.kt
  28. +0 −45 core/src/commonMain/kotlin/com/xebia/functional/xef/embeddings/OpenAIEmbeddings.kt
  29. +0 −31 core/src/commonMain/kotlin/com/xebia/functional/xef/embeddings/mock/Mock.kt
  30. +0 −66 core/src/commonMain/kotlin/com/xebia/functional/xef/env/config.kt
  31. +0 −41 core/src/commonMain/kotlin/com/xebia/functional/xef/env/env.kt
  32. +12 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/env/getenv.kt
  33. +0 −35 core/src/commonMain/kotlin/com/xebia/functional/xef/ktor.kt
  34. +0 −5 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/AIClientError.kt
  35. +326 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/Chat.kt
  36. +78 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/ChatWithFunctions.kt
  37. +11 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/Completion.kt
  38. +8 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/Embeddings.kt
  39. +45 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/Images.kt
  40. +7 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/LLM.kt
  41. +0 −35 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/huggingface/HuggingFaceClient.kt
  42. +0 −10 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/huggingface/models.kt
  43. +11 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChatChunk.kt
  44. +20 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChatCompletionChunk.kt
  45. +17 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChatCompletionRequest.kt
  46. +20 −0 .../commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChatCompletionRequestWithFunctions.kt
  47. +12 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChatCompletionResponse.kt
  48. +12 −0 ...commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChatCompletionResponseWithFunctions.kt
  49. +14 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChatDelta.kt
  50. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/Choice.kt
  51. +7 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/ChoiceWithFunctions.kt
  52. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/Message.kt
  53. +10 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/MessageWithFunctionCall.kt
  54. +7 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/chat/Role.kt
  55. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/embeddings/Embedding.kt
  56. +5 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/embeddings/EmbeddingModel.kt
  57. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/embeddings/EmbeddingRequest.kt
  58. +5 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/embeddings/EmbeddingResult.kt
  59. +9 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/embeddings/RequestConfig.kt
  60. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/functions/CFunction.kt
  61. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/functions/FunctionCall.kt
  62. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/images/ImageGenerationUrl.kt
  63. +9 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/images/ImagesGenerationRequest.kt
  64. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/images/ImagesGenerationResponse.kt
  65. +8 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/text/CompletionChoice.kt
  66. +21 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/text/CompletionRequest.kt
  67. +12 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/text/CompletionResult.kt
  68. +7 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/models/usage/Usage.kt
  69. +0 −153 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/openai/OpenAIClient.kt
  70. +0 −152 core/src/commonMain/kotlin/com/xebia/functional/xef/llm/openai/models.kt
  71. +1 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/loaders/BaseLoader.kt
  72. +20 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/prompt/experts/ExpertSystem.kt
  73. +2 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/textsplitters/TextSplitter.kt
  74. +5 −7 core/src/commonMain/kotlin/com/xebia/functional/xef/textsplitters/TokenTextSplitter.kt
  75. +11 −1 core/src/commonMain/kotlin/com/xebia/functional/xef/vectorstores/CombinedVectorStore.kt
  76. +3 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/vectorstores/ConversationId.kt
  77. +42 −28 core/src/commonMain/kotlin/com/xebia/functional/xef/vectorstores/LocalVectorStore.kt
  78. +5 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/vectorstores/Memory.kt
  79. +15 −0 core/src/commonMain/kotlin/com/xebia/functional/xef/vectorstores/VectorStore.kt
  80. +2 −0 core/src/jvmMain/kotlin/com/xebia/functional/xef/agents/DefaultSearch.kt
  81. +0 −200 core/src/jvmMain/kotlin/com/xebia/functional/xef/agents/LLMAgent.kt
  82. +14 −9 core/src/jvmMain/kotlin/com/xebia/functional/xef/loaders/ScrapeURLTextLoader.kt
  83. +193 −0 docs/intro/java.md
  84. +5 −5 docs/intro/kotlin.md
  85. +1 −1 docs/intro/scala.md
  86. +14 −0 examples/java/build.gradle.kts
  87. +15 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/ASCIIArt.java
  88. +63 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Animals.java
  89. +19 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Book.java
  90. +45 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Books.java
  91. +35 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/BreakingNews.java
  92. +76 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/ChessAI.java
  93. +17 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Colors.java
  94. +22 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/DivergentTasks.java
  95. +42 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Employee.java
  96. +53 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Fact.java
  97. +15 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Love.java
  98. +41 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Markets.java
  99. +42 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/MealPlan.java
  100. +17 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/MeaningOfLife.java
  101. +26 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Movies.java
  102. +53 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/PDFDocument.java
  103. +24 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Persons.java
  104. +39 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Planets.java
  105. +28 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Poems.java
  106. +27 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Populations.java
  107. +20 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Recipes.java
  108. +37 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/TopAttractions.java
  109. +23 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/TouristAttractions.java
  110. +23 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/Weather.java
  111. +10 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/tot/Checker.java
  112. +33 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/tot/ControlSignals.java
  113. +36 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/tot/Critiques.java
  114. +39 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/tot/Main.java
  115. +119 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/tot/Problems.java
  116. +38 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/tot/Rendering.java
  117. +65 −0 examples/java/src/main/java/com/xebia/functional/xef/java/auto/tot/Solutions.java
  118. +12 −4 examples/kotlin/build.gradle.kts
  119. +4 −2 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/ASCIIArt.kt
  120. +6 −4 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Animal.kt
  121. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Book.kt
  122. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/BreakingNews.kt
  123. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/ChessAI.kt
  124. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Colors.kt
  125. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/DivergentTasks.kt
  126. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Employee.kt
  127. +6 −1 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Fact.kt
  128. +4 −1 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Love.kt
  129. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Markets.kt
  130. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/MealPlan.kt
  131. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/MeaningOfLife.kt
  132. +3 −1 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Movie.kt
  133. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/PDFDocument.kt
  134. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Person.kt
  135. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Planet.kt
  136. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Poem.kt
  137. +3 −4 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Population.kt
  138. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Recipe.kt
  139. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/TopAttraction.kt
  140. +2 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/TouristAttraction.kt
  141. +6 −4 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/Weather.kt
  142. +24 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/fields/Book.kt
  143. +36 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/fields/NewsSummary.kt
  144. +52 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/gpt4all/Chat.kt
  145. +47 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/manual/NoAI.kt
  146. +18 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/memory/ChatWithMemory.kt
  147. +0 −35 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/pattern/Alphabet.kt
  148. +43 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/prompts/ExpertSystemExample.kt
  149. +21 −14 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/sql/DatabaseExample.kt
  150. +19 −0 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/streaming/OpenAIStreamingExample.kt
  151. +3 −4 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/tot/ControlSignal.kt
  152. +3 −4 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/tot/Critique.kt
  153. +5 −5 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/tot/Main.kt
  154. +3 −3 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/tot/Problem.kt
  155. +0 −9 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/tot/Rendering.kt
  156. +0 −20 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/tot/Search.kt
  157. +5 −7 examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto/tot/Solution.kt
  158. +4 −0 examples/kotlin/src/main/resources/logback.xml
  159. +2 −2 examples/scala/src/main/scala/com/xebia/functional/xef/scala/auto/Population.scala
  160. +0 −47 examples/scala/src/main/scala/com/xebia/functional/xef/scala/auto/SynopsisReview.scala
  161. +1 −1 examples/scala/src/main/scala/com/xebia/functional/xef/scala/auto/Weather.scala
  162. +24 −0 gpt4all-kotlin/README.MD
  163. +93 −0 gpt4all-kotlin/build.gradle.kts
  164. +16 −0 gpt4all-kotlin/src/commonMain/kotlin/com/xebia/functional/gpt4all/models.kt
  165. +176 −0 gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/GPT4All.kt
  166. +47 −0 gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/Gpt4AllRuntime.kt
  167. +40 −0 gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/HuggingFaceLocalEmbeddings.kt
  168. +4 −0 gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/HuggingFaceUtils.kt
  169. +34 −0 gpt4all-kotlin/src/jvmMain/kotlin/com/xebia/functional/gpt4all/Models.kt
  170. +12 −0 gpt4all-kotlin/src/jvmTest/kotlin/com/xebia/functional/xef/tests/GPT4ALLModelSpec.kt
  171. +1 −1 gradle.properties
  172. +39 −61 gradle/libs.versions.toml
  173. 0 gradlew.bat
  174. +64 −12 integrations/lucene/src/main/kotlin/com/xebia/functional/xef/vectorstores/Lucene.kt
  175. +2 −1 integrations/pdf/src/main/kotlin/com/xebia/functional/xef/pdf/PDFLoader.kt
  176. +48 −8 ...rations/postgresql/src/main/kotlin/com/xebia/functional/xef/vectorstores/PostgreSQLVectorStore.kt
  177. +64 −36 ...rations/postgresql/src/main/kotlin/com/xebia/functional/xef/vectorstores/postgresql/JDBCSyntax.kt
  178. +35 −0 integrations/postgresql/src/main/kotlin/com/xebia/functional/xef/vectorstores/postgresql/postgres.kt
  179. +31 −5 integrations/postgresql/src/test/kotlin/xef/PGVectorStoreSpec.kt
  180. +14 −15 integrations/sql/src/main/kotlin/com/xebia/functional/xef/sql/SQL.kt
  181. +2 −2 integrations/sql/src/main/kotlin/com/xebia/functional/xef/sql/jdbc/JdbcConfig.kt
  182. +26 −0 java/README.md
  183. +33 −0 java/build.gradle.kts
  184. +197 −0 java/src/main/java/com/xebia/functional/xef/java/auto/AIScope.java
  185. +90 −0 kotlin/build.gradle.kts
  186. +4 −0 kotlin/src/commonMain/kotlin/com/xebia/functional/xef/auto/DSLExtensions.kt
  187. +4 −0 models/gpt4all/get-models.sh
  188. +183 −0 openai/build.gradle.kts
  189. +80 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/DeserializerLLMAgent.kt
  190. +41 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/ImageGenerationAgent.kt
  191. +38 −128 ...ialization → openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai}/JsonSchema.kt
  192. +131 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/MockAIClient.kt
  193. +57 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAI.kt
  194. +313 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIClient.kt
  195. +29 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIEmbeddings.kt
  196. +48 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIRuntime.kt
  197. +86 −0 openai/src/commonMain/kotlin/com/xebia/functional/xef/auto/llm/openai/OpenAIScopeExtensions.kt
  198. +3 −55 scala-cats/build.gradle.kts
  199. +3 −52 scala/build.gradle.kts
  200. +2 −2 scala/src/main/scala/com/xebia/functional/xef/scala/agents/DefaultSearch.scala
  201. +3 −3 scala/src/main/scala/com/xebia/functional/xef/scala/auto/AIScope.scala
  202. +61 −63 scala/src/main/scala/com/xebia/functional/xef/scala/auto/package.scala
  203. +0 −22 scala/src/main/scala/com/xebia/functional/xef/scala/prompt/PromptTemplate.scala
  204. +39 −15 settings.gradle.kts
  205. +46 −41 tokenizer/src/commonMain/kotlin/com/xebia/functional/tokenizer/ModelType.kt
26 changes: 23 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -9,9 +9,23 @@ concurrency:

jobs:
check:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 15

strategy:
matrix:
include:
- platform: jvm
os: ubuntu-latest
- platform: js
os: ubuntu-latest
- platform: linuxX64
os: ubuntu-latest
- platform: macosX64
os: macos-latest
- platform: mingwX64
os: windows-latest

steps:
- uses: actions/checkout@v3
with:
@@ -23,10 +37,16 @@ jobs:
distribution: 'zulu'
java-version: 19

- name: build
- name: Build and Test (multip)
uses: gradle/gradle-build-action@v2
with:
arguments: buildAndTestMultip -Pplatform=${{ matrix.platform }}

- name: Build and Test (singlep)
uses: gradle/gradle-build-action@v2
with:
arguments: build --full-stacktrace
arguments: buildAndTestSinglep -Pplatform=${{ matrix.platform }}
if: ${{ matrix.platform == 'jvm' }}

- name: Upload reports
if: failure()
2 changes: 1 addition & 1 deletion .github/workflows/publish-development-version.yml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ jobs:
- name: Assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -x:kotlin-loom:assemble -x:xef-scala:assemble -x:xef-scala-examples:assemble
arguments: assemble -x:kotlin-loom:assemble -x:xef-java-examples:assemble -x:xef-scala:assemble -x:xef-scala-examples:assemble

- name: Upload reports
if: failure()
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ jobs:
- name: Assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -x:kotlin-loom:assemble -x:xef-scala:assemble -x:xef-scala-examples:assemble
arguments: assemble -x:kotlin-loom:assemble -x:xef-java-examples:assemble -x:xef-scala:assemble -x:xef-scala-examples:assemble

- name: Upload reports
if: failure()
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -147,3 +147,5 @@ kotlin-js-store/
.jekyll-metadata

.env

*.bin
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ strategies.

Libraries are published in Maven Central, under the `com.xebia` group.

1. `xef-core` for Kotlin support, `xef-scala` for Scala.
1. `xef-kotlin` for Kotlin support, `xef-scala` for Scala, `xef-java` for Java.
2. The name of a library we provide integration for, like `xef-lucene`.

<details>
@@ -67,7 +67,7 @@ Then add the library in the usual way.
```kotlin
// In Gradle Kotlin
dependencies {
implementation("com.xebia:xef-core:<version>")
implementation("com.xebia:xef-kotlin:<version>")
}
```

@@ -90,16 +90,36 @@ libraryDependencies += "com.xebia" %% "xef-scala" % "<version>"
</details>

<details>
<summary><img src="https://en.wikipedia.org/wiki/Apache_Maven#/media/File:Apache_Maven_logo.svg" height="15px" alt="Maven logo"> Maven</summary>

Libraries are published in Maven Central. You may need to add that repository explicitly
in your build, if you haven't done it before.

```xml
<dependency>
<groupId>com.xebia</groupId>
<artifactId>xef-java</artifactId>
<version>x.x.x</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
```

</details>

## 📖 Quick Introduction

In this small introduction we look at the main features of xef, including the `ai` function.

- [<img src="https://upload.wikimedia.org/wikipedia/commons/3/37/Kotlin_Icon_2021.svg" height="15px" alt="Kotlin logo"> Kotlin version](https://github.com/xebia-functional/xef/blob/main/docs/intro/kotlin.md)
- [<img src="https://www.scala-lang.org/resources/img/frontpage/scala-spiral.png" height="15px" alt="Scala logo"> Scala version](https://github.com/xebia-functional/xef/blob/main/docs/intro/scala.md)
- [<img src="https://en.wikipedia.org/wiki/Java_(programming_language)#/media/File:Java_programming_language_logo.svg" height="15px" alt="Java logo"> Java version](https://github.com/xebia-functional/xef/blob/main/docs/intro/java.md)

## 🚀 Examples

You can also have a look at the examples to have a feeling of how using the library looks like.

- [<img src="https://upload.wikimedia.org/wikipedia/commons/3/37/Kotlin_Icon_2021.svg" height="15px" alt="Kotlin logo"> Examples in Kotlin](https://github.com/xebia-functional/xef/tree/main/examples/kotlin/src/main/kotlin/com/xebia/functional/xef/auto)
- [<img src="https://www.scala-lang.org/resources/img/frontpage/scala-spiral.png" height="15px" alt="Scala logo"> Examples in Scala](https://github.com/xebia-functional/xef/tree/main/examples/scala/src/main/scala/com/xebia/functional/xef/scala/auto)
- [<img src="https://en.wikipedia.org/wiki/Java_(programming_language)#/media/File:Java_programming_language_logo.svg" height="15px" alt="Java logo"> Examples in Java](https://github.com/xebia-functional/xef/tree/main/examples/java/src/main/java/com/xebia/functional/xef/java/auto)
63 changes: 63 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -14,3 +14,66 @@ plugins {
allprojects {
group = property("project.group").toString()
}

fun isMultiplatformModule(project: Project): Boolean {
val kotlinPluginId = "libs.plugins.kotlin.multiplatform"
return project.buildFile.readText().contains(kotlinPluginId)
}

val multiPlatformModules = project.subprojects.filter { isMultiplatformModule(it) }.map { it.name }

enum class ModuleType {
MULTIPLATFORM,
SINGLEPLATFORM
}

fun Project.configureBuildAndTestTask(
taskName: String,
moduleType: ModuleType,
multiPlatformModules: List<String>
) {
val platform: String by extra

tasks.register(taskName) {
doLast {
project.exec {
val gradleCommand = getGradleCommand(platform)
commandLine(gradleCommand, "spotlessCheck")
when (moduleType) {
ModuleType.MULTIPLATFORM -> {
multiPlatformModules.forEach { module ->
commandLine(gradleCommand, ":$module:${platform}Test")
}
}
ModuleType.SINGLEPLATFORM -> {
commandLine(gradleCommand, "build", *buildExcludeOptions(multiPlatformModules))
}
}
}
}
}
}

fun Project.buildExcludeOptions(modules: List<String>): Array<String> {
return modules.flatMap { listOf("-x", ":$it:build") }.toTypedArray()
}

fun getGradleCommand(platform: String): String {
return if (platform == "mingwX64") {
"gradlew.bat"
} else {
"./gradlew"
}
}

configureBuildAndTestTask(
"buildAndTestMultip",
ModuleType.MULTIPLATFORM,
multiPlatformModules
)

configureBuildAndTestTask(
"buildAndTestSinglep",
ModuleType.SINGLEPLATFORM,
multiPlatformModules
)
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -5,4 +5,4 @@ plugins {
repositories {
mavenCentral()
gradlePluginPortal()
}
}
49 changes: 49 additions & 0 deletions buildSrc/src/main/kotlin/JavaPublishingConventionsPlugin.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.BasePlugin
import org.gradle.api.plugins.BasePluginExtension
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.bundling.Jar
import org.gradle.kotlin.dsl.findByType
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.register
import org.gradle.plugins.signing.SigningExtension

class JavaPublishingConventionsPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run {
val publishingExtension: PublishingExtension =
extensions.findByType<PublishingExtension>()
?: throw IllegalStateException("The Maven Publish plugin is required to publish the build artifacts")

val signingExtension: SigningExtension =
extensions.findByType<SigningExtension>()
?: throw IllegalStateException("The Signing plugin is required to digitally sign the built artifacts")

val basePluginExtension: BasePluginExtension =
extensions.findByType<BasePluginExtension>()
?: throw IllegalStateException("The Base plugin is required to configure the name of artifacts")

publishingExtension.run {
publications {
register<MavenPublication>("maven") {
from(components["java"])
pomConfiguration(project)
}
}
}

signingExtension.run {
val isLocal = gradle.startParameter.taskNames.any { it.contains("publishToMavenLocal", ignoreCase = true) }
val signingKeyId: String? = configValue("signing.keyId", "SIGNING_KEY_ID")
val signingKey: String? = configValue("signing.key", "SIGNING_KEY")
val signingPassphrase: String? = configValue("signing.passphrase", "SIGNING_KEY_PASSPHRASE")

isRequired = !isLocal
useGpgCmd()
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassphrase)
sign(publishingExtension.publications)
}
}
}
51 changes: 51 additions & 0 deletions buildSrc/src/main/kotlin/Predef.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import org.gradle.api.Project
import org.gradle.api.publish.maven.MavenPublication

internal fun Project.configValue(propertyName: String, environmentVariableName: String): String? {
val property: String? = project.properties[propertyName]?.toString()
val environmentVariable: String? = System.getenv(environmentVariableName)

val configValue = property ?: environmentVariable

return configValue.also {
if (configValue.isNullOrBlank()) {
errorMessage(
"$propertyName Gradle property and " +
"$environmentVariableName environment variable are missing",
)
}
}
}

internal fun MavenPublication.pomConfiguration(project: Project) {
pom {
name.set(project.properties["pom.name"]?.toString())
description.set(project.properties["pom.description"]?.toString())
url.set(project.properties["pom.url"]?.toString())

licenses {
license {
name.set(project.properties["pom.license.name"]?.toString())
url.set(project.properties["pom.license.url"]?.toString())
}
}

developers {
developer {
id.set(project.properties["pom.developer.id"].toString())
name.set(project.properties["pom.developer.name"].toString())
}
}

scm {
url.set(project.properties["pom.smc.url"].toString())
connection.set(project.properties["pom.smc.connection"].toString())
developerConnection.set(project.properties["pom.smc.developerConnection"].toString())
}
}
}

internal fun Project.errorMessage(message: String) = logger.lifecycle("$YELLOW$message$RESET")

private const val RESET = "\u001B[0m"
private const val YELLOW = "\u001B[0;33m"
15 changes: 0 additions & 15 deletions buildSrc/src/main/kotlin/ScalaDocumentationPlugin.kt

This file was deleted.

62 changes: 62 additions & 0 deletions buildSrc/src/main/kotlin/ScalaPublishingConventionsPlugin.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.BasePlugin
import org.gradle.api.plugins.BasePluginExtension
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.bundling.Jar
import org.gradle.kotlin.dsl.findByType
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.register
import org.gradle.plugins.signing.SigningExtension

class ScalaPublishingConventionsPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run {
val scaladocJarTask: TaskProvider<Jar> = tasks.register<Jar>("scaladocJar") {
group = BasePlugin.BUILD_GROUP
tasks.findByName("scaladoc")?.let { dependsOn(it) }
?: errorMessage("The scaladoc task was not found. The Javadoc jar file won't contain any documentation")
archiveClassifier.set("javadoc")
from("$buildDir/docs/scaladoc")
}

val publishingExtension: PublishingExtension =
extensions.findByType<PublishingExtension>()
?: throw IllegalStateException("The Maven Publish plugin is required to publish the build artifacts")

val signingExtension: SigningExtension =
extensions.findByType<SigningExtension>()
?: throw IllegalStateException("The Signing plugin is required to digitally sign the built artifacts")

val basePluginExtension: BasePluginExtension =
extensions.findByType<BasePluginExtension>()
?: throw IllegalStateException("The Base plugin is required to configure the name of artifacts")

publishingExtension.run {
publications {
register<MavenPublication>("maven") {
val scala3Suffix = "_3"

artifactId = basePluginExtension.archivesName.get() + scala3Suffix
from(components["java"])
artifact(scaladocJarTask)

pomConfiguration(project)
}
}
}

signingExtension.run {
val isLocal = gradle.startParameter.taskNames.any { it.contains("publishToMavenLocal", ignoreCase = true) }
val signingKeyId: String? = configValue("signing.keyId", "SIGNING_KEY_ID")
val signingKey: String? = configValue("signing.key", "SIGNING_KEY")
val signingPassphrase: String? = configValue("signing.passphrase", "SIGNING_KEY_PASSPHRASE")

isRequired = !isLocal
useGpgCmd()
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassphrase)
sign(publishingExtension.publications)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apply<JavaPublishingConventionsPlugin>()

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apply<ScalaPublishingConventionsPlugin>()
Loading