Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: MissingFieldException: Fields [name, arguments] in ToolCallStep$FunctionTool #271

Merged
merged 3 commits into from
Nov 25, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,18 @@ public sealed interface ToolCallStep {
@SerialName("function")
public data class FunctionTool(
/**
* The name of the function.
* The ID of the tool call object.
*/
@SerialName("name") public val name: String,
@SerialName("id") public val id: String,
voqaldev marked this conversation as resolved.
Show resolved Hide resolved
/**
* The definition of the function that was called.
*/
@SerialName("function") public val function: FunctionDefinition,
) : ToolCallStep

@BetaOpenAI
@Serializable
public data class FunctionDefinition (
voqaldev marked this conversation as resolved.
Show resolved Hide resolved
/**
* The arguments passed to the function.
*/
Expand All @@ -101,7 +110,7 @@ public sealed interface ToolCallStep {
* The output of the function. This will be null if the outputs have not been submitted yet.
*/
@SerialName("output") public val output: String? = null,
) : ToolCallStep
)
}

@BetaOpenAI
Expand Down
Loading