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

agent: support any json for function call input #283

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all 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
13 changes: 7 additions & 6 deletions pkg/api/agent/v1/websocket/interfaces/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
Expand Down