Documentation
¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( HistSizeKey = ContextKeyType[int]{"HistSize"} StartTimeKey = ContextKeyType[time.Time]{"StartTime"} StartBalanceKey = ContextKeyType[map[string]string]{"StartBalance"} CurrentModelIDKey = ContextKeyType[int64]{"CurrentModelID"} CurrentModelNameKey = ContextKeyType[string]{"CurrentModelName"} CurrentDomainIDKey = ContextKeyType[int64]{"CurrentDomainID"} ToolCallIDKey = ContextKeyType[string]{"ToolCallID"} ShellNameKey = ContextKeyType[string]{"ShellName"} ShellArgsKey = ContextKeyType[[]string]{"ShellArgs"} ShellStdinKey = ContextKeyType[io.Reader]{"ShellStdin"} InputContentKey = ContextKeyType[string]{"InputContent"} InsideShellExecKey = ContextKeyType[bool]{"InsideShellExec"} StreamKey = ContextKeyType[bool]{"Stream"} LeftTokensKey = ContextKeyType[int]{"LeftTokens"} WechatFormatKey = ContextKeyType[string]{"WechatFormat"} ToolDisplayNameKey = ContextKeyType[string]{"ToolDisplayName"} FinishReasonLengthKey = ContextKeyType[bool]{"FinishReasonLength"} GitWorkingDirKey = ContextKeyType[string]{"GitWorkingDir"} )
View Source
var ( WithTimeout = context.WithTimeout WithValue = context.WithValue WithCancel = context.WithCancel DeadlineExceeded = context.DeadlineExceeded Background = context.Background )
View Source
var ( ConfigDir = GetConfigDir() ProjectRoot = GetProjectRoot() ModelDeepseekChat = Getenv("MODEL_DEEPSEEK_CHAT", "deepseek-chat") ModelDeepseekReasoner = Getenv("MODEL_DEEPSEEK_REASONER", "deepseek-reasoner") )
Functions ¶
func ContextValue ¶
func ContextValue[T any](ctx context.Context, k ContextKeyType[T], d T) (v T)
Types ¶
type CancelFunc ¶
type CancelFunc = context.CancelFunc
Source Files
¶
- context.go
Click to show internal directories.
Click to hide internal directories.