Skip to content

Commit

Permalink
Do not attempt to call functions without arguments (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulraja authored Jan 10, 2024
1 parent 180e829 commit 6024ab6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class AssistantThread(
emit(RunDelta.Step(step))
step.stepDetails.toolCalls().forEach { toolCall ->
val function = toolCall.function
if (function != null) {
if (function != null && function.arguments.isNotBlank()) {
val result: JsonElement = Tool(function.name, function.arguments)
api.submitToolOuputsToRun(
threadId = threadId,
Expand Down

0 comments on commit 6024ab6

Please sign in to comment.