Documentation
¶
Index ¶
- func NewHTTPBackendService(baseURL, token string, client *http.Client) backendservice.Service
- func NewHTTPChatService(baseURL, token string, client *http.Client) chatservice.Service
- func NewHTTPDownloadService(baseURL, token string, client *http.Client) downloadservice.Service
- func NewHTTPEmbedService(baseURL, token string, client *http.Client) embedservice.Service
- func NewHTTPExecService(baseURL, token string, client *http.Client) execservice.ExecService
- func NewHTTPModelService(baseURL, token string, client *http.Client) modelservice.Service
- func NewHTTPProviderService(baseURL, token string, client *http.Client) providerservice.Service
- func NewHTTPRemoteHookService(baseURL, token string, client *http.Client) hookproviderservice.Service
- func NewHTTPStateService(baseURL, token string, client *http.Client) stateservice.Service
- func NewHTTPTaskChainService(baseURL, token string, client *http.Client) taskchainservice.Service
- func NewHTTPTasksEnvService(baseURL, token string, client *http.Client) execservice.TasksEnvService
- func NewHTTPgroupService(baseURL, token string, client *http.Client) affinitygroupservice.Service
- type Client
- type Config
- type HTTPBackendService
- func (s *HTTPBackendService) Create(ctx context.Context, backend *runtimetypes.Backend) error
- func (s *HTTPBackendService) Delete(ctx context.Context, id string) error
- func (s *HTTPBackendService) Get(ctx context.Context, id string) (*runtimetypes.Backend, error)
- func (s *HTTPBackendService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Backend, error)
- func (s *HTTPBackendService) Update(ctx context.Context, backend *runtimetypes.Backend) error
- type HTTPChatService
- func (s *HTTPChatService) OpenAIChatCompletions(ctx context.Context, chainID string, req taskengine.OpenAIChatRequest) (*taskengine.OpenAIChatResponse, []taskengine.CapturedStateUnit, error)
- func (s *HTTPChatService) OpenAIChatCompletionsStream(ctx context.Context, chainID string, req taskengine.OpenAIChatRequest, ...) (<-chan chatservice.OpenAIChatStreamChunk, error)
- type HTTPDownloadService
- func (s *HTTPDownloadService) CancelDownloads(ctx context.Context, urlParam string) error
- func (s *HTTPDownloadService) CurrentDownloadQueueState(ctx context.Context) ([]downloadservice.Job, error)
- func (s *HTTPDownloadService) DownloadInProgress(ctx context.Context, statusCh chan<- *runtimetypes.Status) error
- func (s *HTTPDownloadService) RemoveDownloadFromQueue(ctx context.Context, modelName string) error
- type HTTPEmbedService
- type HTTPExecService
- type HTTPModelService
- func (s *HTTPModelService) Append(ctx context.Context, model *runtimetypes.Model) error
- func (s *HTTPModelService) Delete(ctx context.Context, modelName string) error
- func (s *HTTPModelService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Model, error)
- func (s *HTTPModelService) Update(ctx context.Context, data *runtimetypes.Model) error
- type HTTPProviderService
- func (s *HTTPProviderService) DeleteProviderConfig(ctx context.Context, providerType string) error
- func (s *HTTPProviderService) GetProviderConfig(ctx context.Context, providerType string) (*runtimestate.ProviderConfig, error)
- func (s *HTTPProviderService) ListProviderConfigs(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimestate.ProviderConfig, error)
- func (s *HTTPProviderService) SetProviderConfig(ctx context.Context, providerType string, upsert bool, ...) error
- type HTTPRemoteHookService
- func (s *HTTPRemoteHookService) Create(ctx context.Context, hook *runtimetypes.RemoteHook) error
- func (s *HTTPRemoteHookService) Delete(ctx context.Context, id string) error
- func (s *HTTPRemoteHookService) Get(ctx context.Context, id string) (*runtimetypes.RemoteHook, error)
- func (s *HTTPRemoteHookService) GetByName(ctx context.Context, name string) (*runtimetypes.RemoteHook, error)
- func (s *HTTPRemoteHookService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.RemoteHook, error)
- func (s *HTTPRemoteHookService) Update(ctx context.Context, hook *runtimetypes.RemoteHook) error
- type HTTPStateService
- type HTTPTaskChainService
- func (s *HTTPTaskChainService) Create(ctx context.Context, chain *taskengine.TaskChainDefinition) error
- func (s *HTTPTaskChainService) Delete(ctx context.Context, id string) error
- func (s *HTTPTaskChainService) Get(ctx context.Context, id string) (*taskengine.TaskChainDefinition, error)
- func (s *HTTPTaskChainService) List(ctx context.Context, cursor *time.Time, limit int) ([]*taskengine.TaskChainDefinition, error)
- func (s *HTTPTaskChainService) Update(ctx context.Context, chain *taskengine.TaskChainDefinition) error
- type HTTPTasksEnvService
- type HTTPgroupService
- func (s *HTTPgroupService) AssignBackend(ctx context.Context, groupID, backendID string) error
- func (s *HTTPgroupService) AssignModel(ctx context.Context, groupID, modelID string) error
- func (s *HTTPgroupService) Create(ctx context.Context, group *runtimetypes.AffinityGroup) error
- func (s *HTTPgroupService) Delete(ctx context.Context, id string) error
- func (s *HTTPgroupService) GetByID(ctx context.Context, id string) (*runtimetypes.AffinityGroup, error)
- func (s *HTTPgroupService) GetByName(ctx context.Context, name string) (*runtimetypes.AffinityGroup, error)
- func (s *HTTPgroupService) ListAffinityGroupsForBackend(ctx context.Context, backendID string) ([]*runtimetypes.AffinityGroup, error)
- func (s *HTTPgroupService) ListAffinityGroupsForModel(ctx context.Context, modelID string) ([]*runtimetypes.AffinityGroup, error)
- func (s *HTTPgroupService) ListAll(ctx context.Context) ([]*runtimetypes.AffinityGroup, error)
- func (s *HTTPgroupService) ListBackends(ctx context.Context, groupID string) ([]*runtimetypes.Backend, error)
- func (s *HTTPgroupService) ListByPurpose(ctx context.Context, purpose string, createdAtCursor *time.Time, limit int) ([]*runtimetypes.AffinityGroup, error)
- func (s *HTTPgroupService) ListModels(ctx context.Context, groupID string) ([]*runtimetypes.Model, error)
- func (s *HTTPgroupService) RemoveBackend(ctx context.Context, groupID, backendID string) error
- func (s *HTTPgroupService) RemoveModel(ctx context.Context, groupID, modelID string) error
- func (s *HTTPgroupService) Update(ctx context.Context, group *runtimetypes.AffinityGroup) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPBackendService ¶
func NewHTTPBackendService(baseURL, token string, client *http.Client) backendservice.Service
NewHTTPBackendService creates a new HTTP client that implements backendservice.Service
func NewHTTPChatService ¶ added in v0.0.58
func NewHTTPChatService(baseURL, token string, client *http.Client) chatservice.Service
NewHTTPChatService creates a new HTTP client that implements chatservice.Service
func NewHTTPDownloadService ¶
func NewHTTPDownloadService(baseURL, token string, client *http.Client) downloadservice.Service
NewHTTPDownloadService creates a new HTTP client that implements downloadservice.Service
func NewHTTPEmbedService ¶ added in v0.0.6
func NewHTTPEmbedService(baseURL, token string, client *http.Client) embedservice.Service
NewHTTPEmbedService creates a new HTTP client that implements embedservice.Service
func NewHTTPExecService ¶
func NewHTTPExecService(baseURL, token string, client *http.Client) execservice.ExecService
NewHTTPExecService creates a new HTTP client that implements execservice.ExecService
func NewHTTPModelService ¶
func NewHTTPModelService(baseURL, token string, client *http.Client) modelservice.Service
NewHTTPModelService creates a new HTTP client that implements modelservice.Service
func NewHTTPProviderService ¶
func NewHTTPProviderService(baseURL, token string, client *http.Client) providerservice.Service
NewHTTPProviderService creates a new HTTP client that implements providerservice.Service
func NewHTTPRemoteHookService ¶
func NewHTTPRemoteHookService(baseURL, token string, client *http.Client) hookproviderservice.Service
NewHTTPRemoteHookService creates a new HTTP client that implements hookproviderservice.Service
func NewHTTPStateService ¶ added in v0.0.5
func NewHTTPStateService(baseURL, token string, client *http.Client) stateservice.Service
NewHTTPStateService creates a new HTTP client that implements stateservice.Service
func NewHTTPTaskChainService ¶ added in v0.0.58
func NewHTTPTaskChainService(baseURL, token string, client *http.Client) taskchainservice.Service
NewHTTPTaskChainService creates a new HTTP client that implements taskchainservice.Service
func NewHTTPTasksEnvService ¶
func NewHTTPTasksEnvService(baseURL, token string, client *http.Client) execservice.TasksEnvService
NewHTTPTasksEnvService creates a new HTTP client that implements execservice.TasksEnvService
func NewHTTPgroupService ¶ added in v0.0.65
func NewHTTPgroupService(baseURL, token string, client *http.Client) affinitygroupservice.Service
NewHTTPgroupService creates a new HTTP client that implements groupservice.Service
Types ¶
type Client ¶
type Client struct {
BackendService backendservice.Service
ModelService modelservice.Service
HookService hookproviderservice.Service
ExecService execservice.ExecService
EnvService execservice.TasksEnvService
ProviderService providerservice.Service
DownloadService downloadservice.Service
StateService stateservice.Service
EmbedService embedservice.Service
TaskChainService taskchainservice.Service
ChatService chatservice.Service
// contains filtered or unexported fields
}
Client is the main SDK client that provides access to all services
type HTTPBackendService ¶
type HTTPBackendService struct {
// contains filtered or unexported fields
}
HTTPBackendService implements the backendservice.Service interface using HTTP calls to the API
func (*HTTPBackendService) Create ¶
func (s *HTTPBackendService) Create(ctx context.Context, backend *runtimetypes.Backend) error
Create implements backendservice.Service.Create
func (*HTTPBackendService) Delete ¶
func (s *HTTPBackendService) Delete(ctx context.Context, id string) error
Delete implements backendservice.Service.Delete
func (*HTTPBackendService) Get ¶
func (s *HTTPBackendService) Get(ctx context.Context, id string) (*runtimetypes.Backend, error)
Get implements backendservice.Service.Get
func (*HTTPBackendService) List ¶
func (s *HTTPBackendService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Backend, error)
List implements backendservice.Service.List
func (*HTTPBackendService) Update ¶
func (s *HTTPBackendService) Update(ctx context.Context, backend *runtimetypes.Backend) error
Update implements backendservice.Service.Update
type HTTPChatService ¶ added in v0.0.58
type HTTPChatService struct {
// contains filtered or unexported fields
}
HTTPChatService implements the chatservice.Service interface using HTTP calls to the API
func (*HTTPChatService) OpenAIChatCompletions ¶ added in v0.0.58
func (s *HTTPChatService) OpenAIChatCompletions(ctx context.Context, chainID string, req taskengine.OpenAIChatRequest) (*taskengine.OpenAIChatResponse, []taskengine.CapturedStateUnit, error)
OpenAIChatCompletions implements chatservice.Service.OpenAIChatCompletions
func (*HTTPChatService) OpenAIChatCompletionsStream ¶ added in v0.0.64
func (s *HTTPChatService) OpenAIChatCompletionsStream(ctx context.Context, chainID string, req taskengine.OpenAIChatRequest, speed time.Duration) (<-chan chatservice.OpenAIChatStreamChunk, error)
OpenAIChatCompletionsStream implements chatservice.Service.OpenAIChatCompletionsStream
type HTTPDownloadService ¶
type HTTPDownloadService struct {
// contains filtered or unexported fields
}
HTTPDownloadService implements the downloadservice.Service interface using HTTP calls to the API
func (*HTTPDownloadService) CancelDownloads ¶
func (s *HTTPDownloadService) CancelDownloads(ctx context.Context, urlParam string) error
CancelDownloads implements downloadservice.Service.CancelDownloads
func (*HTTPDownloadService) CurrentDownloadQueueState ¶
func (s *HTTPDownloadService) CurrentDownloadQueueState(ctx context.Context) ([]downloadservice.Job, error)
CurrentDownloadQueueState implements downloadservice.Service.CurrentDownloadQueueState
func (*HTTPDownloadService) DownloadInProgress ¶
func (s *HTTPDownloadService) DownloadInProgress(ctx context.Context, statusCh chan<- *runtimetypes.Status) error
DownloadInProgress implements downloadservice.Service.DownloadInProgress
func (*HTTPDownloadService) RemoveDownloadFromQueue ¶
func (s *HTTPDownloadService) RemoveDownloadFromQueue(ctx context.Context, modelName string) error
RemoveDownloadFromQueue implements downloadservice.Service.RemoveDownloadFromQueue
type HTTPEmbedService ¶ added in v0.0.6
type HTTPEmbedService struct {
// contains filtered or unexported fields
}
HTTPEmbedService implements the embedservice.Service interface using HTTP calls to the API
func (*HTTPEmbedService) DefaultModelName ¶ added in v0.0.7
func (s *HTTPEmbedService) DefaultModelName(ctx context.Context) (string, error)
DefaultModelName implements embedservice.Service.
type HTTPExecService ¶
type HTTPExecService struct {
// contains filtered or unexported fields
}
HTTPExecService implements the execservice.ExecService interface using HTTP calls to the API
func (*HTTPExecService) Execute ¶
func (s *HTTPExecService) Execute(ctx context.Context, request *execservice.TaskRequest) (*execservice.SimpleExecutionResponse, error)
Execute implements execservice.ExecService.Execute
type HTTPModelService ¶
type HTTPModelService struct {
// contains filtered or unexported fields
}
HTTPModelService implements the modelservice.Service interface using HTTP calls to the API
func (*HTTPModelService) Append ¶
func (s *HTTPModelService) Append(ctx context.Context, model *runtimetypes.Model) error
Append implements modelservice.Service.Append
func (*HTTPModelService) Delete ¶
func (s *HTTPModelService) Delete(ctx context.Context, modelName string) error
Delete implements modelservice.Service.Delete
func (*HTTPModelService) List ¶
func (s *HTTPModelService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.Model, error)
List implements modelservice.Service.List Uses the /models endpoint to get full model details
func (*HTTPModelService) Update ¶ added in v0.0.19
func (s *HTTPModelService) Update(ctx context.Context, data *runtimetypes.Model) error
Update implements modelservice.Service.Update
type HTTPProviderService ¶
type HTTPProviderService struct {
// contains filtered or unexported fields
}
HTTPProviderService implements the providerservice.Service interface using HTTP calls to the API
func (*HTTPProviderService) DeleteProviderConfig ¶
func (s *HTTPProviderService) DeleteProviderConfig(ctx context.Context, providerType string) error
DeleteProviderConfig implements providerservice.Service.DeleteProviderConfig
func (*HTTPProviderService) GetProviderConfig ¶
func (s *HTTPProviderService) GetProviderConfig(ctx context.Context, providerType string) (*runtimestate.ProviderConfig, error)
GetProviderConfig implements providerservice.Service.GetProviderConfig
func (*HTTPProviderService) ListProviderConfigs ¶
func (s *HTTPProviderService) ListProviderConfigs(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimestate.ProviderConfig, error)
ListProviderConfigs implements providerservice.Service.ListProviderConfigs
func (*HTTPProviderService) SetProviderConfig ¶
func (s *HTTPProviderService) SetProviderConfig(ctx context.Context, providerType string, upsert bool, config *runtimestate.ProviderConfig) error
SetProviderConfig implements providerservice.Service.SetProviderConfig
type HTTPRemoteHookService ¶
type HTTPRemoteHookService struct {
// contains filtered or unexported fields
}
HTTPRemoteHookService implements the hookproviderservice.Service interface using HTTP calls to the API
func (*HTTPRemoteHookService) Create ¶
func (s *HTTPRemoteHookService) Create(ctx context.Context, hook *runtimetypes.RemoteHook) error
Create implements hookproviderservice.Service.Create
func (*HTTPRemoteHookService) Delete ¶
func (s *HTTPRemoteHookService) Delete(ctx context.Context, id string) error
Delete implements hookproviderservice.Service.Delete
func (*HTTPRemoteHookService) Get ¶
func (s *HTTPRemoteHookService) Get(ctx context.Context, id string) (*runtimetypes.RemoteHook, error)
Get implements hookproviderservice.Service.Get
func (*HTTPRemoteHookService) GetByName ¶
func (s *HTTPRemoteHookService) GetByName(ctx context.Context, name string) (*runtimetypes.RemoteHook, error)
GetByName implements hookproviderservice.Service.GetByName
func (*HTTPRemoteHookService) List ¶
func (s *HTTPRemoteHookService) List(ctx context.Context, createdAtCursor *time.Time, limit int) ([]*runtimetypes.RemoteHook, error)
List implements hookproviderservice.Service.List
func (*HTTPRemoteHookService) Update ¶
func (s *HTTPRemoteHookService) Update(ctx context.Context, hook *runtimetypes.RemoteHook) error
Update implements hookproviderservice.Service.Update
type HTTPStateService ¶ added in v0.0.5
type HTTPStateService struct {
// contains filtered or unexported fields
}
HTTPStateService implements the stateservice.Service interface using HTTP calls to the API
func (*HTTPStateService) Get ¶ added in v0.0.5
func (h *HTTPStateService) Get(ctx context.Context) ([]statetype.BackendRuntimeState, error)
Get implements modelservice.Service.Get
type HTTPTaskChainService ¶ added in v0.0.58
type HTTPTaskChainService struct {
// contains filtered or unexported fields
}
HTTPTaskChainService implements the taskchainservice.Service interface using HTTP calls to the API
func (*HTTPTaskChainService) Create ¶ added in v0.0.58
func (s *HTTPTaskChainService) Create(ctx context.Context, chain *taskengine.TaskChainDefinition) error
Create implements taskchainservice.Service.Create
func (*HTTPTaskChainService) Delete ¶ added in v0.0.58
func (s *HTTPTaskChainService) Delete(ctx context.Context, id string) error
Delete implements taskchainservice.Service.Delete
func (*HTTPTaskChainService) Get ¶ added in v0.0.58
func (s *HTTPTaskChainService) Get(ctx context.Context, id string) (*taskengine.TaskChainDefinition, error)
Get implements taskchainservice.Service.Get
func (*HTTPTaskChainService) List ¶ added in v0.0.58
func (s *HTTPTaskChainService) List(ctx context.Context, cursor *time.Time, limit int) ([]*taskengine.TaskChainDefinition, error)
List implements taskchainservice.Service.List
func (*HTTPTaskChainService) Update ¶ added in v0.0.58
func (s *HTTPTaskChainService) Update(ctx context.Context, chain *taskengine.TaskChainDefinition) error
Update implements taskchainservice.Service.Update
type HTTPTasksEnvService ¶
type HTTPTasksEnvService struct {
// contains filtered or unexported fields
}
func (*HTTPTasksEnvService) Execute ¶
func (s *HTTPTasksEnvService) Execute(ctx context.Context, chain *taskengine.TaskChainDefinition, input any, inputType taskengine.DataType) (any, taskengine.DataType, []taskengine.CapturedStateUnit, error)
Execute implements execservice.TasksEnvService.Execute
type HTTPgroupService ¶ added in v0.0.65
type HTTPgroupService struct {
// contains filtered or unexported fields
}
HTTPgroupService implements the groupservice.Service interface using HTTP calls to the API
func (*HTTPgroupService) AssignBackend ¶ added in v0.0.65
func (s *HTTPgroupService) AssignBackend(ctx context.Context, groupID, backendID string) error
AssignBackend implements groupservice.Service.AssignBackend
func (*HTTPgroupService) AssignModel ¶ added in v0.0.65
func (s *HTTPgroupService) AssignModel(ctx context.Context, groupID, modelID string) error
AssignModel implements groupservice.Service.AssignModel
func (*HTTPgroupService) Create ¶ added in v0.0.65
func (s *HTTPgroupService) Create(ctx context.Context, group *runtimetypes.AffinityGroup) error
Create implements groupservice.Service.Create
func (*HTTPgroupService) Delete ¶ added in v0.0.65
func (s *HTTPgroupService) Delete(ctx context.Context, id string) error
Delete implements groupservice.Service.Delete
func (*HTTPgroupService) GetByID ¶ added in v0.0.65
func (s *HTTPgroupService) GetByID(ctx context.Context, id string) (*runtimetypes.AffinityGroup, error)
GetByID implements groupservice.Service.GetByID
func (*HTTPgroupService) GetByName ¶ added in v0.0.65
func (s *HTTPgroupService) GetByName(ctx context.Context, name string) (*runtimetypes.AffinityGroup, error)
GetByName implements groupservice.Service.GetByName
func (*HTTPgroupService) ListAffinityGroupsForBackend ¶ added in v0.0.65
func (s *HTTPgroupService) ListAffinityGroupsForBackend(ctx context.Context, backendID string) ([]*runtimetypes.AffinityGroup, error)
ListAffinityGroupsForBackend implements groupservice.Service.ListAffinityGroupsForBackend
func (*HTTPgroupService) ListAffinityGroupsForModel ¶ added in v0.0.65
func (s *HTTPgroupService) ListAffinityGroupsForModel(ctx context.Context, modelID string) ([]*runtimetypes.AffinityGroup, error)
ListAffinityGroupsForModel implements groupservice.Service.ListAffinityGroupsForModel
func (*HTTPgroupService) ListAll ¶ added in v0.0.65
func (s *HTTPgroupService) ListAll(ctx context.Context) ([]*runtimetypes.AffinityGroup, error)
ListAll implements groupservice.Service.ListAll
func (*HTTPgroupService) ListBackends ¶ added in v0.0.65
func (s *HTTPgroupService) ListBackends(ctx context.Context, groupID string) ([]*runtimetypes.Backend, error)
ListBackends implements groupservice.Service.ListBackends
func (*HTTPgroupService) ListByPurpose ¶ added in v0.0.65
func (s *HTTPgroupService) ListByPurpose(ctx context.Context, purpose string, createdAtCursor *time.Time, limit int) ([]*runtimetypes.AffinityGroup, error)
ListByPurpose implements groupservice.Service.ListByPurpose
func (*HTTPgroupService) ListModels ¶ added in v0.0.65
func (s *HTTPgroupService) ListModels(ctx context.Context, groupID string) ([]*runtimetypes.Model, error)
ListModels implements groupservice.Service.ListModels
func (*HTTPgroupService) RemoveBackend ¶ added in v0.0.65
func (s *HTTPgroupService) RemoveBackend(ctx context.Context, groupID, backendID string) error
RemoveBackend implements groupservice.Service.RemoveBackend
func (*HTTPgroupService) RemoveModel ¶ added in v0.0.65
func (s *HTTPgroupService) RemoveModel(ctx context.Context, groupID, modelID string) error
RemoveModel implements groupservice.Service.RemoveModel
func (*HTTPgroupService) Update ¶ added in v0.0.65
func (s *HTTPgroupService) Update(ctx context.Context, group *runtimetypes.AffinityGroup) error
Update implements groupservice.Service.Update