feat: publish v1.0.0-rc.36-custom.1
Publish Docker image (Multi-arch) / Build & push (amd64) (push) Failing after 9m20s
Release (Linux, macOS, Windows) / Linux Release (push) Failing after 55m7s
Publish Docker image (Multi-arch) / Build & push (arm64) (push) Canceled after 0s
Release (Linux, macOS, Windows) / macOS Release (push) Canceled after 0s
Release (Linux, macOS, Windows) / Windows Release (push) Canceled after 0s
Publish Docker image (Multi-arch) / Create multi-arch manifests (push) Canceled after 0s

This commit is contained in:
Codex committed 2026-09-11 05:07:48 +08:00
commit bb7968b612
2381 files changed
+551494

No files matched your search

@@ -0,0 +1,118 @@
package toolconv
import (
"encoding/json"
"github.com/QuantumNous/new-api/relaykit/types"
)
type Kind string
const (
KindFunction Kind = "function"
KindWebSearch Kind = "web_search"
KindFileSearch Kind = "file_search"
KindWebFetch Kind = "web_fetch"
KindCodeExecution Kind = "code_execution"
KindComputerUse Kind = "computer_use"
KindURLContext Kind = "url_context"
KindMCP Kind = "mcp"
KindImage Kind = "image_generation"
KindNative Kind = "native"
)
type Execution string
const (
ExecutionClient Execution = "client"
ExecutionServer Execution = "server"
)
type Function struct {
Name string
Description string
Parameters any
Strict *bool
}
type ApproximateLocation struct {
City string
Region string
Country string
Timezone string
}
type WebSearch struct {
Location *ApproximateLocation
AllowedDomains []string
BlockedDomains []string
SearchContextSize string
MaxUses *int
AllowedCallers []string
ResponseInclusion string
ExternalWebAccess *bool
ReturnTokenBudget json.RawMessage
}
type Definition struct {
Kind Kind
Execution Execution
NativeType string
Name string
Function *Function
WebSearch *WebSearch
Raw json.RawMessage
Group int
}
type ChoiceMode string
const (
ChoiceAuto ChoiceMode = "auto"
ChoiceNone ChoiceMode = "none"
ChoiceRequired ChoiceMode = "required"
ChoiceNamed ChoiceMode = "named"
ChoiceOpaque ChoiceMode = "opaque"
)
type Choice struct {
Mode ChoiceMode
Kind Kind
Name string
AllowedNames []string
NativeType string
DisableParallelToolUse *bool
Raw json.RawMessage
}
type Set struct {
Source types.RelayFormat
Definitions []Definition
Choice *Choice
ParallelAllowed *bool
NativeToolConfig json.RawMessage
History []HostedHistoryItem
}
func (s Set) Empty() bool {
return len(s.Definitions) == 0 && s.Choice == nil && s.ParallelAllowed == nil && len(s.NativeToolConfig) == 0 && len(s.History) == 0
}
type HostedHistoryItem struct {
Kind Kind
NativeType string
Role string
MessageIndex int
BlockIndex int
MessageHasRegular bool
Sequence int
ID string
CallID string
Name string
ServerName string
Status string
Action json.RawMessage
Results json.RawMessage
Caller json.RawMessage
Raw json.RawMessage
}