Skip to content

Commit

Permalink
Removed overload requests for Singul
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Feb 2, 2025
1 parent dd5882d commit f0f8532
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
8 changes: 0 additions & 8 deletions shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -24892,14 +24892,6 @@ func RunCategoryAction(resp http.ResponseWriter, request *http.Request) {
}

ctx := GetContext(request)
err := ValidateRequestOverload(resp, request)
if err != nil {
log.Printf("[ERROR] Request overload for Run Category Action with IP %s", GetRequestIp(request))
resp.WriteHeader(429)
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Too many requests. This is an experimental AI feature and can't handle burst traffic yet."}`)))
return
}

user, err := HandleApiAuthentication(resp, request)
if err != nil {
// Look for "authorization" and "execution_id" queries
Expand Down
13 changes: 7 additions & 6 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4034,24 +4034,25 @@ type WorkflowSearchResult struct {

// Used for the integrations API to work with AI well
type StructuredCategoryAction struct {
Success bool `json:"success"`
Action string `json:"action"`
Reason string `json:"reason"`

WorkflowId string `json:"workflow_id,omitempty"`
ExecutionId string `json:"execution_id,omitempty"`
Label string `json:"label"`
Category string `json:"category"`
Label string `json:"label,omitempty"`
Category string `json:"category,omitempty"`
Apps []WorkflowApp `json:"apps,omitempty"`

Result string `json:"result,omitempty"`

AvailableLabels []string `json:"available_labels"`
AvailableLabels []string `json:"available_labels,omitempty"`
ThreadId string `json:"thread_id,omitempty"`
RunId string `json:"run_id,omitempty"`
MissingFields []string `json:"missing_fields,omitempty"`

Translated bool `json:"translated,omitempty"`

Success bool `json:"success"`
Action string `json:"action"`
Reason string `json:"reason"`
}

type ModelLabelParameter struct {
Expand Down

0 comments on commit f0f8532

Please sign in to comment.