requests

package
v0.0.0-...-e06565c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRequestInvokeModel

type BaseRequestInvokeModel struct {
	Provider string `json:"provider" validate:"required"`
	Model    string `json:"model" validate:"required"`
}

type Credentials

type Credentials struct {
	Credentials map[string]any `json:"credentials" validate:"omitempty"`
}

type InvokeAgentStrategySchema

type InvokeAgentStrategySchema struct {
	AgentStrategyProvider string         `json:"agent_strategy_provider" validate:"required"`
	AgentStrategy         string         `json:"agent_strategy" validate:"required"`
	AgentStrategyParams   map[string]any `json:"agent_strategy_params" validate:"omitempty"`
}

type InvokeLLMSchema

type InvokeLLMSchema struct {
	ModelParameters map[string]any                     `json:"model_parameters"  validate:"omitempty"`
	PromptMessages  []model_entities.PromptMessage     `json:"prompt_messages"  validate:"omitempty"`
	Tools           []model_entities.PromptMessageTool `json:"tools" validate:"omitempty,dive"`
	Stop            []string                           `json:"stop" validate:"omitempty"`
	Stream          bool                               `json:"stream"`
}

type InvokeModerationSchema

type InvokeModerationSchema struct {
	Text string `json:"text" validate:"required"`
}

type InvokeNodeRequest

type InvokeNodeRequest[T WorkflowNodeData] struct {
	NodeType NodeType `json:"node_type"`
	NodeData T        `json:"node_data"`
}

type InvokeRerankSchema

type InvokeRerankSchema struct {
	Query          string   `json:"query" validate:"required"`
	Docs           []string `json:"docs" validate:"required,dive"`
	ScoreThreshold float64  `json:"score_threshold" `
	TopN           int      `json:"top_n" `
}

type InvokeSpeech2TextSchema

type InvokeSpeech2TextSchema struct {
	File string `json:"file" validate:"required"` // hexing encoded voice file
}

type InvokeTTSSchema

type InvokeTTSSchema struct {
	ContentText string `json:"content_text"  validate:"required"`
	Voice       string `json:"voice" validate:"required"`
	TenantID    string `json:"tenant_id" validate:"required"`
}

type InvokeTextEmbeddingSchema

type InvokeTextEmbeddingSchema struct {
	Texts     []string `json:"texts" validate:"required,dive"`
	InputType string   `json:"input_type" validate:"required"`
}

type InvokeToolSchema

type InvokeToolSchema struct {
	Provider       string         `json:"provider" validate:"required"`
	Tool           string         `json:"tool" validate:"required"`
	ToolParameters map[string]any `json:"tool_parameters" validate:"omitempty"`
}

type KnowledgeRetrievalNodeData

type KnowledgeRetrievalNodeData struct {
}

type NodeType

type NodeType string
const (
	KNOWLEDGE_RETRIEVAL NodeType = "knowledge_retrieval"
	QUESTION_CLASSIFIER NodeType = "question_classifier"
	PARAMETER_EXTRACTOR NodeType = "parameter_extractor"
)

type ParameterExtractorNodeData

type ParameterExtractorNodeData struct {
}

type QuestionClassifierNodeData

type QuestionClassifierNodeData struct {
}

type RequestGetAIModelSchema

type RequestGetAIModelSchema struct {
	BaseRequestInvokeModel
	Credentials

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type"`
}

type RequestGetLLMNumTokens

type RequestGetLLMNumTokens struct {
	BaseRequestInvokeModel
	Credentials

	ModelType      model_entities.ModelType           `json:"model_type"  validate:"required,model_type,eq=llm"`
	PromptMessages []model_entities.PromptMessage     `json:"prompt_messages"  validate:"omitempty,dive"`
	Tools          []model_entities.PromptMessageTool `json:"tools" validate:"omitempty,dive"`
}

func (RequestGetLLMNumTokens) MarshalJSON

func (r RequestGetLLMNumTokens) MarshalJSON() ([]byte, error)

type RequestGetRemoteDebuggingKey

type RequestGetRemoteDebuggingKey struct {
	TenantID string `uri:"tenant_id" validate:"required"`
}

type RequestGetTTSModelVoices

type RequestGetTTSModelVoices struct {
	BaseRequestInvokeModel
	Credentials

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=tts"`
	Language  string                   `json:"language" validate:"omitempty"`
}

type RequestGetTextEmbeddingNumTokens

type RequestGetTextEmbeddingNumTokens struct {
	BaseRequestInvokeModel
	Credentials

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=text-embedding"`
	Texts     []string                 `json:"texts" validate:"required,dive"`
}

type RequestGetToolRuntimeParameters

type RequestGetToolRuntimeParameters struct {
	Provider    string         `json:"provider" validate:"required"`
	Tool        string         `json:"tool" validate:"required"`
	Credentials map[string]any `json:"credentials" validate:"omitempty"`
}

type RequestInvokeAgentStrategy

type RequestInvokeAgentStrategy struct {
	InvokeAgentStrategySchema
}

type RequestInvokeEndpoint

type RequestInvokeEndpoint struct {
	RawHttpRequest string         `json:"raw_http_request" validate:"required"`
	Settings       map[string]any `json:"settings" validate:"omitempty"`
}

type RequestInvokeLLM

type RequestInvokeLLM struct {
	BaseRequestInvokeModel
	Credentials
	InvokeLLMSchema

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=llm"`
}

type RequestInvokeModeration

type RequestInvokeModeration struct {
	BaseRequestInvokeModel
	Credentials
	InvokeModerationSchema

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=moderation"`
}

type RequestInvokeRerank

type RequestInvokeRerank struct {
	BaseRequestInvokeModel
	Credentials
	InvokeRerankSchema

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=rerank"`
}

type RequestInvokeSpeech2Text

type RequestInvokeSpeech2Text struct {
	BaseRequestInvokeModel
	Credentials
	InvokeSpeech2TextSchema

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=speech2text"`
}

type RequestInvokeTTS

type RequestInvokeTTS struct {
	BaseRequestInvokeModel
	Credentials
	InvokeTTSSchema

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=tts"`
}

type RequestInvokeTextEmbedding

type RequestInvokeTextEmbedding struct {
	BaseRequestInvokeModel
	Credentials
	InvokeTextEmbeddingSchema

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type,eq=text-embedding"`
}

type RequestInvokeTool

type RequestInvokeTool struct {
	InvokeToolSchema
	Credentials
}

type RequestOAuthGetAuthorizationURL

type RequestOAuthGetAuthorizationURL struct {
	Provider          string         `json:"provider" validate:"required"`
	SystemCredentials map[string]any `json:"system_credentials" validate:"omitempty"`
}

type RequestOAuthGetCredentials

type RequestOAuthGetCredentials struct {
	Provider          string         `json:"provider" validate:"required"`
	SystemCredentials map[string]any `json:"system_credentials" validate:"omitempty"`
	RawHttpRequest    string         `json:"raw_http_request" validate:"required"` // hex encoded raw http request from the oauth provider
}

type RequestValidateModelCredentials

type RequestValidateModelCredentials struct {
	BaseRequestInvokeModel
	Credentials

	ModelType model_entities.ModelType `json:"model_type"  validate:"required,model_type"`
}

type RequestValidateProviderCredentials

type RequestValidateProviderCredentials struct {
	Credentials

	Provider string `json:"provider" validate:"required"`
}

type RequestValidateToolCredentials

type RequestValidateToolCredentials struct {
	Provider    string         `json:"provider" validate:"required"`
	Credentials map[string]any `json:"credentials" validate:"omitempty"`
}

type ToolType

type ToolType string
const (
	TOOL_TYPE_BUILTIN  ToolType = "builtin"
	TOOL_TYPE_WORKFLOW ToolType = "workflow"
	TOOL_TYPE_API      ToolType = "api"
	TOOL_TYPE_MCP      ToolType = "mcp"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL