Package-level declarations

Functions

Link copied to clipboard
fun Embedding.distance(other: Embedding): Double

Calculate the distance between two embeddings, corresponding to 1.0 - similarity.

Link copied to clipboard
fun <T> AssistantStreamEvent.getData(): T

Get the data of the AssistantStreamEvent using the provided serializer from the corresponding event type.

fun <T> AssistantStreamEvent.getData(serializer: KSerializer<T>): T

Get the data of the AssistantStreamEvent using the provided serializer.

Link copied to clipboard
fun List<ChatChunk>.mergeToChatMessage(): ChatMessage

Merges a list of ChatChunks into a single consolidated ChatMessage.

Link copied to clipboard
fun Embedding.similarity(other: Embedding): Double

Compute the similarity of two embeddings using cosine similarity.