This reverts commit e556a816e4.
This commit is contained in:
1 parent
e556a816e4
commit
6421f146a9
35 files changed
+169
-3317
No files matched your search
@@ -55,12 +55,6 @@ func buildCLIToolsPrompt(tools []ToolDefinition) string {
|
||||
func NormalizeToolCall(tc ToolCall) ToolCall {
|
||||
normalized := tc
|
||||
|
||||
if normalized.ThoughtSignature == "" &&
|
||||
normalized.ExtraContent != nil &&
|
||||
normalized.ExtraContent.Google != nil {
|
||||
normalized.ThoughtSignature = normalized.ExtraContent.Google.ThoughtSignature
|
||||
}
|
||||
|
||||
// Ensure Name is populated from Function if not set
|
||||
if normalized.Name == "" && normalized.Function != nil {
|
||||
normalized.Name = normalized.Function.Name
|
||||
@@ -83,9 +77,8 @@ func NormalizeToolCall(tc ToolCall) ToolCall {
|
||||
argsJSON, _ := json.Marshal(normalized.Arguments)
|
||||
if normalized.Function == nil {
|
||||
normalized.Function = &FunctionCall{
|
||||
Name: normalized.Name,
|
||||
Arguments: string(argsJSON),
|
||||
ThoughtSignature: normalized.ThoughtSignature,
|
||||
Name: normalized.Name,
|
||||
Arguments: string(argsJSON),
|
||||
}
|
||||
} else {
|
||||
if normalized.Function.Name == "" {
|
||||
@@ -97,12 +90,6 @@ func NormalizeToolCall(tc ToolCall) ToolCall {
|
||||
if normalized.Function.Arguments == "" {
|
||||
normalized.Function.Arguments = string(argsJSON)
|
||||
}
|
||||
if normalized.Function.ThoughtSignature == "" {
|
||||
normalized.Function.ThoughtSignature = normalized.ThoughtSignature
|
||||
}
|
||||
if normalized.ThoughtSignature == "" {
|
||||
normalized.ThoughtSignature = normalized.Function.ThoughtSignature
|
||||
}
|
||||
}
|
||||
|
||||
return normalized
|
||||
|
||||
Reference in new issue
Block a user