Documentation
¶
Overview ¶
Package v1 provides API clients for interacting with Dify services.
Index ¶
Constants ¶
View Source
const ( // StreamMode represents the streaming response mode for workflow execution StreamMode = "streaming" // BlockingMode represents the blocking response mode for workflow execution BlockingMode = "blocking" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileService ¶
type FileService struct {
// contains filtered or unexported fields
}
FileService is a service for file operations.
func NewFileService ¶
func NewFileService(baseURL, apiKey string) *FileService
NewFileService creates a new FileService instance with the provided baseURL and apiKey.
func (*FileService) Upload ¶
func (f *FileService) Upload(ctx context.Context, req schema.UploadFileRequest) (schema.UploadFileResponse, error)
Upload upload file to dify.
type WorkflowService ¶ added in v0.1.1
type WorkflowService struct {
// contains filtered or unexported fields
}
WorkflowService represents a client for interacting with the workflow API endpoints.
func NewWorkflowService ¶ added in v0.1.1
func NewWorkflowService(baseURL, apiKey string) *WorkflowService
NewWorkflowService creates a new Workflow client instance.
func (*WorkflowService) Run ¶ added in v0.1.1
func (w *WorkflowService) Run( ctx context.Context, req schema.RunWorkflowRequest, ) (schema.RunWorkflowResponse, error)
Run executes a workflow in blocking mode, Cannot execute if there is no published workflow.
func (*WorkflowService) RunStream ¶ added in v0.1.1
func (w *WorkflowService) RunStream( ctx context.Context, req schema.RunWorkflowRequest, respCh chan schema.StreamEvent[schema.RunWorkflowResponse], ) error
RunStream executes a workflow in streaming mode. Cannot execute if there is no published workflow.
Click to show internal directories.
Click to hide internal directories.