com.cjcrafter.openai.chat.tool.FunctionToolCall.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openai Show documentation
Show all versions of openai Show documentation
Access OpenAI's API without the raw JSON/HTTPS requests
The newest version!
package com.cjcrafter.openai.chat.tool
import com.fasterxml.jackson.annotation.JsonProperty
/**
* Represents a tool call for [Tool.Type.FUNCTION].
*
* @property id The unique id of the tool call. You should use this id in your reply.
* @property function The details about which function was called, parameters, etc.
*/
data class FunctionToolCall(
@JsonProperty(required = true) override val id: String,
@JsonProperty(required = true) val function: FunctionCall,
) : ToolCall() {
override val type = Tool.Type.FUNCTION
override fun update(delta: ToolCallDelta) {
if (delta.function != null)
function.update(delta.function)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy