Skip to content

Commit

Permalink
Bump com.diffplug.spotless from 6.18.0 to 6.19.0 (#181)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
dependabot[bot] and Yawolf authored Jun 13, 2023
1 parent 2a70370 commit 35ada15
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ internal class JsonObjectBuilder(val content: MutableMap<String, JsonElement> =
MutableMap<String, JsonElement> by content {
operator fun set(key: String, value: Iterable<String>) =
set(key, JsonArray(value.map(::JsonPrimitive)))

operator fun set(key: String, value: String?) = set(key, JsonPrimitive(value))

operator fun set(key: String, value: Number?) = set(key, JsonPrimitive(value))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface Embeddings {
chunkSize: Int?,
requestConfig: RequestConfig
): List<Embedding>

suspend fun embedQuery(text: String, requestConfig: RequestConfig): List<Embedding>

companion object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ import kotlinx.serialization.json.Json

interface OpenAIClient {
suspend fun createCompletion(request: CompletionRequest): CompletionResult

suspend fun createChatCompletion(request: ChatCompletionRequest): ChatCompletionResponse

suspend fun createEmbeddings(request: EmbeddingRequest): EmbeddingResult

suspend fun createImages(request: ImagesGenerationRequest): ImagesGenerationResponse
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.xebia.functional.xef.textsplitters.TextSplitter

interface BaseLoader {
suspend fun load(): List<String>

suspend fun loadAndSplit(textSplitter: TextSplitter): List<String> =
textSplitter.splitDocuments(documents = load())
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package com.xebia.functional.xef.textsplitters

interface TextSplitter {
suspend fun splitText(text: String): List<String>

suspend fun splitDocuments(documents: List<String>): List<String>

suspend fun splitTextInDocuments(text: String): List<String>
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ interface VectorStore {
val EMPTY: VectorStore =
object : VectorStore {
override suspend fun addTexts(texts: List<String>) {}

override suspend fun similaritySearch(query: String, limit: Int): List<String> = emptyList()

override suspend fun similaritySearchByVector(
embedding: Embedding,
limit: Int
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ kotlin = "1.8.22"
openai = "0.12.0"
kotlinx-json = "1.5.1"
ktor = "2.3.1"
spotless = "6.18.0"
spotless = "6.19.0"
okio = "3.3.0"
kotest = "5.6.2"
kotest-testcontainers = "1.3.4"
Expand Down

0 comments on commit 35ada15

Please sign in to comment.