From 8a34d74b1e87c14b2edfe492b2e421cdf2224c17 Mon Sep 17 00:00:00 2001 From: Rob Figueiredo Date: Tue, 18 Feb 2025 09:46:02 -0800 Subject: [PATCH] agent: support any json for function call input --- pkg/api/agent/v1/websocket/interfaces/types.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/api/agent/v1/websocket/interfaces/types.go b/pkg/api/agent/v1/websocket/interfaces/types.go index 3082e07..7c0aff2 100644 --- a/pkg/api/agent/v1/websocket/interfaces/types.go +++ b/pkg/api/agent/v1/websocket/interfaces/types.go @@ -5,6 +5,8 @@ package interfacesv1 import ( + "encoding/json" + commoninterfaces "github.com/deepgram/deepgram-go-sdk/pkg/client/common/v1/interfaces" interfaces "github.com/deepgram/deepgram-go-sdk/pkg/client/interfaces" ) @@ -102,16 +104,15 @@ type AgentThinkingResponse struct { // FunctionCallRequestResponse is the response from a function call request type FunctionCallRequestResponse struct { - Type string `json:"type,omitempty"` - FunctionName string `json:"function_name,omitempty"` - FunctionCallID string `json:"function_call_id,omitempty"` - Input map[string]string `json:"input,omitempty"` // TODO: this is still undefined + Type string `json:"type,omitempty"` + FunctionName string `json:"function_name,omitempty"` + FunctionCallID string `json:"function_call_id,omitempty"` + Input json.RawMessage `json:"input,omitempty"` } // FunctionCallingResponse is the response from a function calling type FunctionCallingResponse struct { - Type string `json:"type,omitempty"` - Output map[string]string `json:"output,omitempty"` // TODO: this is still undefined + Type string `json:"type,omitempty"` } // AgentStartedSpeakingResponse is the response from the Agent starting to speak