coze

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkFlowRunResponse

type WorkFlowRunResponse struct {
	Cost  string `json:"cost"`
	Code  int    `json:"code"`
	Msg   string `json:"msg"`
	Data  string `json:"data"`
	Token int    `json:"token"`
}

type Workflow

type Workflow struct {
	PersonalAccessToken string        `json:"-"`
	Timeout             time.Duration `json:"-"`

	// 必选 执行的 Workflow ID,此工作流应已发布。
	WorkflowId string `json:"workflow_id"`

	// 工作流开始节点的输入参数及取值,你可以在指定工作流的编排页面查看参数列表。
	Parameters map[string]any `json:"parameters"`

	// 需要关联的 Bot ID。 部分工作流执行时需要指定关联的 Bot,例如存在数据库节点、变量节点等节点的工作流。
	BotID string `json:"bot_id"`

	// 使用启用流式返回。
	Stream bool `json:"stream"`
	// contains filtered or unexported fields
}

func NewWorkflow

func NewWorkflow(workflow *Workflow) *Workflow

func (*Workflow) Request

func (c *Workflow) Request(ctx context.Context) (*WorkFlowRunResponse, error)

Jump to

Keyboard shortcuts

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