Skip to content

Commit

Permalink
ktfmt common
Browse files Browse the repository at this point in the history
  • Loading branch information
David Motsonashvili committed Mar 21, 2024
1 parent 58e46ab commit 6488871
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.google.ai.client.generativeai.common.client.GenerationConfig
import com.google.ai.client.generativeai.common.client.Tool
import com.google.ai.client.generativeai.common.shared.Content
import com.google.ai.client.generativeai.common.shared.SafetySetting

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand All @@ -32,7 +31,7 @@ data class GenerateContentRequest(
val contents: List<Content>,
@SerialName("safety_settings") val safetySettings: List<SafetySetting>? = null,
@SerialName("generation_config") val generationConfig: GenerationConfig? = null,
val tools: List<Tool>? = null
val tools: List<Tool>? = null,
) : Request

@Serializable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data class GenerationConfig(
@SerialName("top_k") val topK: Int?,
@SerialName("candidate_count") val candidateCount: Int?,
@SerialName("max_output_tokens") val maxOutputTokens: Int?,
@SerialName("stop_sequences") val stopSequences: List<String>?
@SerialName("stop_sequences") val stopSequences: List<String>?,
)

@Serializable data class Tool(val functionDeclarations: List<FunctionDeclaration>)
Expand All @@ -46,5 +46,5 @@ data class FunctionParameterProperties(
val enum: List<String>? = null,
val properties: Map<String, FunctionParameterProperties>? = null,
val required: List<String>? = null,
val items: FunctionParameterProperties? = null
)
val items: FunctionParameterProperties? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,9 @@ data class Content(@EncodeDefault val role: String? = "user", val parts: List<Pa

@Serializable data class FunctionCallPart(val functionCall: FunctionCall) : Part

@Serializable
data class FunctionResponsePart(val functionResponse: FunctionResponse) : Part
@Serializable data class FunctionResponsePart(val functionResponse: FunctionResponse) : Part

@Serializable
data class Blob(
@SerialName("mime_type") val mimeType: String,
val data: Base64,
)
@Serializable data class Blob(@SerialName("mime_type") val mimeType: String, val data: Base64)

@Serializable data class FunctionResponse(val name: String, val response: JsonObject)

Expand Down

0 comments on commit 6488871

Please sign in to comment.