handlers

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WebhookTokenHTTPHeader = "X-Otto8-Webhook-Token"
	WebhookTokenQueryParam = "token"
)
View Source
const DefaultMaxUserThreadTools = 5

Variables

This section is empty.

Functions

func DeleteCredential

func DeleteCredential(req api.Context) error

func ListCredentials

func ListCredentials(req api.Context) error

func MetadataFrom

func MetadataFrom(obj kclient.Object, linkKV ...string) types.Metadata

Types

type AgentHandler

type AgentHandler struct {
	// contains filtered or unexported fields
}

func NewAgentHandler

func NewAgentHandler(gClient *gptscript.GPTScript, serverURL string) *AgentHandler

func (*AgentHandler) ApproveKnowledgeFile

func (a *AgentHandler) ApproveKnowledgeFile(req api.Context) error

func (*AgentHandler) ByID

func (a *AgentHandler) ByID(req api.Context) error

func (*AgentHandler) Create

func (a *AgentHandler) Create(req api.Context) error

func (*AgentHandler) CreateKnowledgeSource

func (a *AgentHandler) CreateKnowledgeSource(req api.Context) error

func (*AgentHandler) Delete

func (a *AgentHandler) Delete(req api.Context) error

func (*AgentHandler) DeleteFile

func (a *AgentHandler) DeleteFile(req api.Context) error

func (*AgentHandler) DeleteKnowledgeFile

func (a *AgentHandler) DeleteKnowledgeFile(req api.Context) error

func (*AgentHandler) DeleteKnowledgeSource

func (a *AgentHandler) DeleteKnowledgeSource(req api.Context) error

func (*AgentHandler) EnsureCredentialForKnowledgeSource

func (a *AgentHandler) EnsureCredentialForKnowledgeSource(req api.Context) error

func (*AgentHandler) List

func (a *AgentHandler) List(req api.Context) error

func (*AgentHandler) ListFiles

func (a *AgentHandler) ListFiles(req api.Context) error

func (*AgentHandler) ListKnowledgeFiles

func (a *AgentHandler) ListKnowledgeFiles(req api.Context) error

func (*AgentHandler) ListKnowledgeSources

func (a *AgentHandler) ListKnowledgeSources(req api.Context) error

func (*AgentHandler) ReIngestKnowledgeFile

func (a *AgentHandler) ReIngestKnowledgeFile(req api.Context) error

func (*AgentHandler) ReSyncKnowledgeSource

func (a *AgentHandler) ReSyncKnowledgeSource(req api.Context) error

func (*AgentHandler) Script

func (a *AgentHandler) Script(req api.Context) error

func (*AgentHandler) Update

func (a *AgentHandler) Update(req api.Context) error

func (*AgentHandler) UpdateKnowledgeSource

func (a *AgentHandler) UpdateKnowledgeSource(req api.Context) error

func (*AgentHandler) UploadFile

func (a *AgentHandler) UploadFile(req api.Context) error

func (*AgentHandler) UploadKnowledgeFile

func (a *AgentHandler) UploadKnowledgeFile(req api.Context) error

type AssistantHandler

type AssistantHandler struct {
	// contains filtered or unexported fields
}

func NewAssistantHandler

func NewAssistantHandler(invoker *invoke.Invoker, events *events.Emitter, gptScript *gptscript.GPTScript) *AssistantHandler

func (*AssistantHandler) Abort added in v0.3.0

func (a *AssistantHandler) Abort(req api.Context) error

func (*AssistantHandler) AddTool

func (a *AssistantHandler) AddTool(req api.Context) error

func (*AssistantHandler) DeleteCredential added in v0.2.0

func (a *AssistantHandler) DeleteCredential(req api.Context) error

func (*AssistantHandler) DeleteFile

func (a *AssistantHandler) DeleteFile(req api.Context) error

func (*AssistantHandler) DeleteKnowledge

func (a *AssistantHandler) DeleteKnowledge(req api.Context) error

func (*AssistantHandler) Events

func (a *AssistantHandler) Events(req api.Context) error

func (*AssistantHandler) Files

func (a *AssistantHandler) Files(req api.Context) error

func (*AssistantHandler) GetFile

func (a *AssistantHandler) GetFile(req api.Context) error

func (*AssistantHandler) Invoke

func (a *AssistantHandler) Invoke(req api.Context) error

func (*AssistantHandler) Knowledge

func (a *AssistantHandler) Knowledge(req api.Context) error

func (*AssistantHandler) List

func (a *AssistantHandler) List(req api.Context) error

func (*AssistantHandler) ListCredentials added in v0.2.0

func (a *AssistantHandler) ListCredentials(req api.Context) error

func (*AssistantHandler) RemoveTool

func (a *AssistantHandler) RemoveTool(req api.Context) error

func (*AssistantHandler) Tools

func (a *AssistantHandler) Tools(req api.Context) error

func (*AssistantHandler) UploadFile

func (a *AssistantHandler) UploadFile(req api.Context) error

func (*AssistantHandler) UploadKnowledge

func (a *AssistantHandler) UploadKnowledge(req api.Context) error

type AvailableModelsHandler added in v0.3.0

type AvailableModelsHandler struct {
	// contains filtered or unexported fields
}

func NewAvailableModelsHandler added in v0.3.0

func NewAvailableModelsHandler(gClient *gptscript.GPTScript, dispatcher *dispatcher.Dispatcher) *AvailableModelsHandler

func (*AvailableModelsHandler) List added in v0.3.0

func (a *AvailableModelsHandler) List(req api.Context) error

func (*AvailableModelsHandler) ListForModelProvider added in v0.3.0

func (a *AvailableModelsHandler) ListForModelProvider(req api.Context) error

type CronJobHandler

type CronJobHandler struct{}

func NewCronJobHandler

func NewCronJobHandler() *CronJobHandler

func (*CronJobHandler) ByID

func (a *CronJobHandler) ByID(req api.Context) error

func (*CronJobHandler) Create

func (a *CronJobHandler) Create(req api.Context) error

func (*CronJobHandler) Delete

func (a *CronJobHandler) Delete(req api.Context) error

func (*CronJobHandler) Execute

func (a *CronJobHandler) Execute(req api.Context) error

func (*CronJobHandler) List

func (a *CronJobHandler) List(req api.Context) error

func (*CronJobHandler) Update

func (a *CronJobHandler) Update(req api.Context) error

type DefaultModelAliasHandler added in v0.2.0

type DefaultModelAliasHandler struct{}

func NewDefaultModelAliasHandler added in v0.2.0

func NewDefaultModelAliasHandler() *DefaultModelAliasHandler

func (*DefaultModelAliasHandler) Create added in v0.2.0

func (d *DefaultModelAliasHandler) Create(req api.Context) error

func (*DefaultModelAliasHandler) Delete added in v0.2.0

func (d *DefaultModelAliasHandler) Delete(req api.Context) error

func (*DefaultModelAliasHandler) GetByID added in v0.2.0

func (d *DefaultModelAliasHandler) GetByID(req api.Context) error

func (*DefaultModelAliasHandler) List added in v0.2.0

func (*DefaultModelAliasHandler) Update added in v0.2.0

func (d *DefaultModelAliasHandler) Update(req api.Context) error

type EmailReceiverHandler added in v0.2.0

type EmailReceiverHandler struct {
	// contains filtered or unexported fields
}

func NewEmailReceiverHandler added in v0.2.0

func NewEmailReceiverHandler(hostname string) *EmailReceiverHandler

func (*EmailReceiverHandler) ByID added in v0.2.0

func (e *EmailReceiverHandler) ByID(req api.Context) error

func (*EmailReceiverHandler) Create added in v0.2.0

func (e *EmailReceiverHandler) Create(req api.Context) error

func (*EmailReceiverHandler) Delete added in v0.2.0

func (e *EmailReceiverHandler) Delete(req api.Context) error

func (*EmailReceiverHandler) List added in v0.2.0

func (e *EmailReceiverHandler) List(req api.Context) error

func (*EmailReceiverHandler) Update added in v0.2.0

func (e *EmailReceiverHandler) Update(req api.Context) error

type InvokeHandler

type InvokeHandler struct {
	// contains filtered or unexported fields
}

func NewInvokeHandler

func NewInvokeHandler(invoker *invoke.Invoker) *InvokeHandler

func (*InvokeHandler) Invoke

func (i *InvokeHandler) Invoke(req api.Context) error

type ModelHandler

type ModelHandler struct{}

func NewModelHandler

func NewModelHandler() *ModelHandler

func (*ModelHandler) ByID

func (a *ModelHandler) ByID(req api.Context) error

func (*ModelHandler) Create

func (a *ModelHandler) Create(req api.Context) error

func (*ModelHandler) Delete

func (a *ModelHandler) Delete(req api.Context) error

func (*ModelHandler) List

func (a *ModelHandler) List(req api.Context) error

func (*ModelHandler) Update

func (a *ModelHandler) Update(req api.Context) error

type ModelProviderHandler added in v0.3.0

type ModelProviderHandler struct {
	// contains filtered or unexported fields
}

func NewModelProviderHandler added in v0.3.0

func NewModelProviderHandler(gClient *gptscript.GPTScript, dispatcher *dispatcher.Dispatcher) *ModelProviderHandler

func (*ModelProviderHandler) ByID added in v0.3.0

func (mp *ModelProviderHandler) ByID(req api.Context) error

func (*ModelProviderHandler) Configure added in v0.3.0

func (mp *ModelProviderHandler) Configure(req api.Context) error

func (*ModelProviderHandler) List added in v0.3.0

func (mp *ModelProviderHandler) List(req api.Context) error

func (*ModelProviderHandler) RefreshModels added in v0.3.0

func (mp *ModelProviderHandler) RefreshModels(req api.Context) error

func (*ModelProviderHandler) Reveal added in v0.3.0

func (mp *ModelProviderHandler) Reveal(req api.Context) error

type PromptHandler

type PromptHandler struct {
	// contains filtered or unexported fields
}

func NewPromptHandler

func NewPromptHandler(gClient *gptscript.GPTScript) *PromptHandler

func (*PromptHandler) Prompt

func (p *PromptHandler) Prompt(req api.Context) error

type RunHandler

type RunHandler struct {
	// contains filtered or unexported fields
}

func NewRunHandler

func NewRunHandler(events *events.Emitter) *RunHandler

func (*RunHandler) ByID

func (a *RunHandler) ByID(req api.Context) error

func (*RunHandler) Debug

func (a *RunHandler) Debug(req api.Context) error

func (*RunHandler) Delete

func (a *RunHandler) Delete(req api.Context) error

func (*RunHandler) Events

func (a *RunHandler) Events(req api.Context) error

func (*RunHandler) List

func (a *RunHandler) List(req api.Context) error

type TaskHandler added in v0.2.0

type TaskHandler struct {
	// contains filtered or unexported fields
}

func NewTaskHandler added in v0.2.0

func NewTaskHandler(invoker *invoke.Invoker, events *events.Emitter) *TaskHandler

func (*TaskHandler) Abort added in v0.3.0

func (t *TaskHandler) Abort(req api.Context) error

func (*TaskHandler) Create added in v0.2.0

func (t *TaskHandler) Create(req api.Context) error

func (*TaskHandler) Delete added in v0.2.0

func (t *TaskHandler) Delete(req api.Context) error

func (*TaskHandler) DeleteRun added in v0.3.0

func (t *TaskHandler) DeleteRun(req api.Context) error

func (*TaskHandler) Events added in v0.2.0

func (t *TaskHandler) Events(req api.Context) error

func (*TaskHandler) Get added in v0.2.0

func (t *TaskHandler) Get(req api.Context) error

func (*TaskHandler) List added in v0.2.0

func (t *TaskHandler) List(req api.Context) error

func (*TaskHandler) ListRuns added in v0.3.0

func (t *TaskHandler) ListRuns(req api.Context) error

func (*TaskHandler) Run added in v0.2.0

func (t *TaskHandler) Run(req api.Context) error

func (*TaskHandler) Update added in v0.2.0

func (t *TaskHandler) Update(req api.Context) error

type ThreadHandler

type ThreadHandler struct {
	// contains filtered or unexported fields
}

func NewThreadHandler

func NewThreadHandler(gClient *gptscript.GPTScript, events *events.Emitter) *ThreadHandler

func (*ThreadHandler) Abort added in v0.3.0

func (a *ThreadHandler) Abort(req api.Context) error

func (*ThreadHandler) ByID

func (a *ThreadHandler) ByID(req api.Context) error

func (*ThreadHandler) Delete

func (a *ThreadHandler) Delete(req api.Context) error

func (*ThreadHandler) DeleteFile

func (a *ThreadHandler) DeleteFile(req api.Context) error

func (*ThreadHandler) DeleteKnowledge

func (a *ThreadHandler) DeleteKnowledge(req api.Context) error

func (*ThreadHandler) Events

func (a *ThreadHandler) Events(req api.Context) error

func (*ThreadHandler) Files

func (a *ThreadHandler) Files(req api.Context) error

func (*ThreadHandler) GetFile

func (a *ThreadHandler) GetFile(req api.Context) error

func (*ThreadHandler) Knowledge

func (a *ThreadHandler) Knowledge(req api.Context) error

func (*ThreadHandler) List

func (a *ThreadHandler) List(req api.Context) error

func (*ThreadHandler) Update

func (a *ThreadHandler) Update(req api.Context) error

func (*ThreadHandler) UploadFile

func (a *ThreadHandler) UploadFile(req api.Context) error

func (*ThreadHandler) UploadKnowledge

func (a *ThreadHandler) UploadKnowledge(req api.Context) error

type ToolReferenceHandler

type ToolReferenceHandler struct {
	// contains filtered or unexported fields
}

func NewToolReferenceHandler

func NewToolReferenceHandler(gClient *gptscript.GPTScript) *ToolReferenceHandler

func (*ToolReferenceHandler) ByID

func (a *ToolReferenceHandler) ByID(req api.Context) error

func (*ToolReferenceHandler) Create

func (a *ToolReferenceHandler) Create(req api.Context) (err error)

func (*ToolReferenceHandler) Delete

func (a *ToolReferenceHandler) Delete(req api.Context) error

func (*ToolReferenceHandler) List

func (a *ToolReferenceHandler) List(req api.Context) error

func (*ToolReferenceHandler) Update

func (a *ToolReferenceHandler) Update(req api.Context) error

type VersionHandler added in v0.3.0

type VersionHandler struct {
	// contains filtered or unexported fields
}

func NewVersionHandler added in v0.3.0

func NewVersionHandler(emailDomain string) *VersionHandler

func (*VersionHandler) GetVersion added in v0.3.0

func (v *VersionHandler) GetVersion(req api.Context) error

type WebhookHandler

type WebhookHandler struct{}

func NewWebhookHandler

func NewWebhookHandler() *WebhookHandler

func (*WebhookHandler) ByID

func (a *WebhookHandler) ByID(req api.Context) error

func (*WebhookHandler) Create

func (a *WebhookHandler) Create(req api.Context) error

func (*WebhookHandler) Delete

func (a *WebhookHandler) Delete(req api.Context) error

func (*WebhookHandler) Execute

func (a *WebhookHandler) Execute(req api.Context) error

func (*WebhookHandler) List

func (a *WebhookHandler) List(req api.Context) error

func (*WebhookHandler) RemoveToken added in v0.2.0

func (a *WebhookHandler) RemoveToken(req api.Context) error

func (*WebhookHandler) Update

func (a *WebhookHandler) Update(req api.Context) error

type WorkflowHandler

type WorkflowHandler struct {
	// contains filtered or unexported fields
}

func NewWorkflowHandler

func NewWorkflowHandler(gClient *gptscript.GPTScript, serverURL string, invoker *invoke.Invoker) *WorkflowHandler

func (*WorkflowHandler) Authenticate

func (a *WorkflowHandler) Authenticate(req api.Context) error

func (*WorkflowHandler) ByID

func (a *WorkflowHandler) ByID(req api.Context) error

func (*WorkflowHandler) Create

func (a *WorkflowHandler) Create(req api.Context) error

func (*WorkflowHandler) Delete

func (a *WorkflowHandler) Delete(req api.Context) error

func (*WorkflowHandler) EnsureCredentialForKnowledgeSource added in v0.2.0

func (a *WorkflowHandler) EnsureCredentialForKnowledgeSource(req api.Context) error

func (*WorkflowHandler) List

func (a *WorkflowHandler) List(req api.Context) error

func (*WorkflowHandler) Script

func (a *WorkflowHandler) Script(req api.Context) error

func (*WorkflowHandler) Update

func (a *WorkflowHandler) Update(req api.Context) error

Jump to

Keyboard shortcuts

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