Skip to content

Commit

Permalink
make AIClient : AutoCloseable
Browse files Browse the repository at this point in the history
  • Loading branch information
raulraja committed Jun 29, 2023
1 parent 1103cdc commit bd097c0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.xebia.functional.xef.llm.models.images.ImagesGenerationResponse
import com.xebia.functional.xef.llm.models.text.CompletionRequest
import com.xebia.functional.xef.llm.models.text.CompletionResult

interface AIClient {
interface AIClient : AutoCloseable {
suspend fun createCompletion(request: CompletionRequest): CompletionResult

suspend fun createChatCompletion(request: ChatCompletionRequest): ChatCompletionResponse
Expand All @@ -23,6 +23,4 @@ interface AIClient {
suspend fun createEmbeddings(request: EmbeddingRequest): EmbeddingResult

suspend fun createImages(request: ImagesGenerationRequest): ImagesGenerationResponse

fun close(): Unit
}

0 comments on commit bd097c0

Please sign in to comment.