Documentation ¶
Index ¶
- type PostgresqlStore
- func (s *PostgresqlStore) Close() error
- func (s *PostgresqlStore) CountSupervisionRequests(ctx context.Context, status asteroid.Status) (int, error)
- func (s *PostgresqlStore) CreateChatRequest(ctx context.Context, runId uuid.UUID, request []byte, response []byte, ...) (*uuid.UUID, error)
- func (s *PostgresqlStore) CreateProject(ctx context.Context, project asteroid.Project) error
- func (s *PostgresqlStore) CreateRun(ctx context.Context, run asteroid.Run) (uuid.UUID, error)
- func (s *PostgresqlStore) CreateSupervisionRequest(ctx context.Context, request asteroid.SupervisionRequest, chainId uuid.UUID, ...) (*uuid.UUID, error)
- func (s *PostgresqlStore) CreateSupervisionResult(ctx context.Context, result asteroid.SupervisionResult, requestId uuid.UUID) (*uuid.UUID, error)
- func (s *PostgresqlStore) CreateSupervisionStatus(ctx context.Context, requestID uuid.UUID, status asteroid.SupervisionStatus) error
- func (s *PostgresqlStore) CreateSupervisor(ctx context.Context, supervisor asteroid.Supervisor) (uuid.UUID, error)
- func (s *PostgresqlStore) CreateSupervisorChain(ctx context.Context, toolId uuid.UUID, chain asteroid.ChainRequest) (*uuid.UUID, error)
- func (s *PostgresqlStore) CreateTask(ctx context.Context, task asteroid.Task) (*uuid.UUID, error)
- func (s *PostgresqlStore) CreateTool(ctx context.Context, runId uuid.UUID, attributes map[string]interface{}, ...) (*asteroid.Tool, error)
- func (s *PostgresqlStore) GetChainExecution(ctx context.Context, executionId uuid.UUID) (*uuid.UUID, *uuid.UUID, error)
- func (s *PostgresqlStore) GetChainExecutionFromChainAndToolCall(ctx context.Context, chainId uuid.UUID, toolCallId uuid.UUID) (*uuid.UUID, error)
- func (s *PostgresqlStore) GetChainExecutionState(ctx context.Context, executionId uuid.UUID) (*asteroid.ChainExecutionState, error)
- func (s *PostgresqlStore) GetChainExecutionSupervisionRequests(ctx context.Context, chainExecutionId uuid.UUID) ([]asteroid.SupervisionRequest, error)
- func (s *PostgresqlStore) GetChainExecutionsFromToolCall(ctx context.Context, id uuid.UUID) ([]uuid.UUID, error)
- func (s *PostgresqlStore) GetChat(ctx context.Context, runId uuid.UUID, index int) ([]byte, []byte, error)
- func (s *PostgresqlStore) GetExecutionFromChainId(ctx context.Context, chainId uuid.UUID) (*uuid.UUID, error)
- func (s *PostgresqlStore) GetMessage(ctx context.Context, id uuid.UUID) (*asteroid.AsteroidMessage, error)
- func (s *PostgresqlStore) GetProject(ctx context.Context, id uuid.UUID) (*asteroid.Project, error)
- func (s *PostgresqlStore) GetProjectFromName(ctx context.Context, name string) (*asteroid.Project, error)
- func (s *PostgresqlStore) GetProjectTasks(ctx context.Context, projectId uuid.UUID) ([]asteroid.Task, error)
- func (s *PostgresqlStore) GetProjectTools(ctx context.Context, projectId uuid.UUID) ([]asteroid.Tool, error)
- func (s *PostgresqlStore) GetProjects(ctx context.Context) ([]asteroid.Project, error)
- func (s *PostgresqlStore) GetRun(ctx context.Context, id uuid.UUID) (*asteroid.Run, error)
- func (s *PostgresqlStore) GetRunChatCount(ctx context.Context, runId uuid.UUID) (int, error)
- func (s *PostgresqlStore) GetRunTools(ctx context.Context, runId uuid.UUID) ([]asteroid.Tool, error)
- func (s *PostgresqlStore) GetRuns(ctx context.Context, taskId uuid.UUID) ([]asteroid.Run, error)
- func (s *PostgresqlStore) GetSupervisionRequest(ctx context.Context, id uuid.UUID) (*asteroid.SupervisionRequest, error)
- func (s *PostgresqlStore) GetSupervisionRequestStatus(ctx context.Context, requestId uuid.UUID) (*asteroid.SupervisionStatus, error)
- func (s *PostgresqlStore) GetSupervisionRequestsForStatus(ctx context.Context, status asteroid.Status) ([]asteroid.SupervisionRequest, error)
- func (s *PostgresqlStore) GetSupervisionResultFromRequestID(ctx context.Context, requestId uuid.UUID) (*asteroid.SupervisionResult, error)
- func (s *PostgresqlStore) GetSupervisionResultsForChainExecution(ctx context.Context, executionId uuid.UUID) ([]asteroid.SupervisionResult, error)
- func (s *PostgresqlStore) GetSupervisionStatusesForChainExecution(ctx context.Context, executionId uuid.UUID) ([]asteroid.SupervisionStatus, error)
- func (s *PostgresqlStore) GetSupervisionStatusesForRequest(ctx context.Context, requestId uuid.UUID) ([]asteroid.SupervisionStatus, error)
- func (s *PostgresqlStore) GetSupervisor(ctx context.Context, id uuid.UUID) (*asteroid.Supervisor, error)
- func (s *PostgresqlStore) GetSupervisorChain(ctx context.Context, chainId uuid.UUID) (*asteroid.SupervisorChain, error)
- func (s *PostgresqlStore) GetSupervisorChains(ctx context.Context, toolId uuid.UUID) ([]asteroid.SupervisorChain, error)
- func (s *PostgresqlStore) GetSupervisorFromValues(ctx context.Context, code string, name string, desc string, ...) (*asteroid.Supervisor, error)
- func (s *PostgresqlStore) GetSupervisors(ctx context.Context, projectId uuid.UUID) ([]asteroid.Supervisor, error)
- func (s *PostgresqlStore) GetTask(ctx context.Context, id uuid.UUID) (*asteroid.Task, error)
- func (s *PostgresqlStore) GetTaskRuns(ctx context.Context, taskId uuid.UUID) ([]asteroid.Run, error)
- func (s *PostgresqlStore) GetTool(ctx context.Context, id uuid.UUID) (*asteroid.Tool, error)
- func (s *PostgresqlStore) GetToolCall(ctx context.Context, id uuid.UUID) (*asteroid.AsteroidToolCall, error)
- func (s *PostgresqlStore) GetToolCallFromCallId(ctx context.Context, id string) (*asteroid.AsteroidToolCall, error)
- func (s *PostgresqlStore) GetToolFromNameAndRunId(ctx context.Context, name string, runId uuid.UUID) (*asteroid.Tool, error)
- func (s *PostgresqlStore) GetToolFromValues(ctx context.Context, attributes map[string]interface{}, name string, ...) (*asteroid.Tool, error)
- func (s *PostgresqlStore) UpdateMessage(ctx context.Context, id uuid.UUID, message asteroid.AsteroidMessage) error
- func (s *PostgresqlStore) UpdateRunResult(ctx context.Context, runId uuid.UUID, result string) error
- func (s *PostgresqlStore) UpdateRunStatus(ctx context.Context, runId uuid.UUID, status asteroid.Status) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresqlStore ¶
type PostgresqlStore struct {
// contains filtered or unexported fields
}
func NewPostgresqlStore ¶
func NewPostgresqlStore() (*PostgresqlStore, error)
NewPostgresqlStore creates a new PostgreSQL store
func (*PostgresqlStore) Close ¶
func (s *PostgresqlStore) Close() error
Close closes the database connection
func (*PostgresqlStore) CountSupervisionRequests ¶
func (*PostgresqlStore) CreateChatRequest ¶
func (s *PostgresqlStore) CreateChatRequest( ctx context.Context, runId uuid.UUID, request []byte, response []byte, choices []asteroid.AsteroidChoice, format string, requestMessages []asteroid.AsteroidMessage, ) (*uuid.UUID, error)
func (*PostgresqlStore) CreateProject ¶
ProjectStore implementation
func (*PostgresqlStore) CreateSupervisionRequest ¶
func (*PostgresqlStore) CreateSupervisionResult ¶
func (s *PostgresqlStore) CreateSupervisionResult(ctx context.Context, result asteroid.SupervisionResult, requestId uuid.UUID) (*uuid.UUID, error)
func (*PostgresqlStore) CreateSupervisionStatus ¶
func (s *PostgresqlStore) CreateSupervisionStatus(ctx context.Context, requestID uuid.UUID, status asteroid.SupervisionStatus) error
func (*PostgresqlStore) CreateSupervisor ¶
func (s *PostgresqlStore) CreateSupervisor(ctx context.Context, supervisor asteroid.Supervisor) (uuid.UUID, error)
func (*PostgresqlStore) CreateSupervisorChain ¶
func (s *PostgresqlStore) CreateSupervisorChain(ctx context.Context, toolId uuid.UUID, chain asteroid.ChainRequest) (*uuid.UUID, error)
func (*PostgresqlStore) CreateTask ¶
func (*PostgresqlStore) CreateTool ¶
func (*PostgresqlStore) GetChainExecution ¶
func (*PostgresqlStore) GetChainExecutionFromChainAndToolCall ¶
func (s *PostgresqlStore) GetChainExecutionFromChainAndToolCall(ctx context.Context, chainId uuid.UUID, toolCallId uuid.UUID) (*uuid.UUID, error)
GetChainExecutionFromChainAndToolCall gets the chain execution ID for a given chain ID and tool call ID
func (*PostgresqlStore) GetChainExecutionState ¶
func (s *PostgresqlStore) GetChainExecutionState(ctx context.Context, executionId uuid.UUID) (*asteroid.ChainExecutionState, error)
GetChainExecutionState returns the chain state for a given chain execution ID
func (*PostgresqlStore) GetChainExecutionSupervisionRequests ¶
func (s *PostgresqlStore) GetChainExecutionSupervisionRequests(ctx context.Context, chainExecutionId uuid.UUID) ([]asteroid.SupervisionRequest, error)
GetChainExecutionSupervisionRequests gets all supervision requests for a specific chain execution
func (*PostgresqlStore) GetChainExecutionsFromToolCall ¶
func (*PostgresqlStore) GetExecutionFromChainId ¶
func (*PostgresqlStore) GetMessage ¶
func (s *PostgresqlStore) GetMessage(ctx context.Context, id uuid.UUID) (*asteroid.AsteroidMessage, error)
func (*PostgresqlStore) GetProject ¶
func (*PostgresqlStore) GetProjectFromName ¶
func (*PostgresqlStore) GetProjectTasks ¶
func (*PostgresqlStore) GetProjectTools ¶
func (*PostgresqlStore) GetProjects ¶
func (*PostgresqlStore) GetRunChatCount ¶
func (*PostgresqlStore) GetRunTools ¶
func (*PostgresqlStore) GetSupervisionRequest ¶
func (s *PostgresqlStore) GetSupervisionRequest(ctx context.Context, id uuid.UUID) (*asteroid.SupervisionRequest, error)
func (*PostgresqlStore) GetSupervisionRequestStatus ¶
func (s *PostgresqlStore) GetSupervisionRequestStatus(ctx context.Context, requestId uuid.UUID) (*asteroid.SupervisionStatus, error)
GetSupervisionRequestStatus gets the latest status for a supervision request
func (*PostgresqlStore) GetSupervisionRequestsForStatus ¶
func (s *PostgresqlStore) GetSupervisionRequestsForStatus(ctx context.Context, status asteroid.Status) ([]asteroid.SupervisionRequest, error)
func (*PostgresqlStore) GetSupervisionResultFromRequestID ¶
func (s *PostgresqlStore) GetSupervisionResultFromRequestID(ctx context.Context, requestId uuid.UUID) (*asteroid.SupervisionResult, error)
func (*PostgresqlStore) GetSupervisionResultsForChainExecution ¶
func (s *PostgresqlStore) GetSupervisionResultsForChainExecution(ctx context.Context, executionId uuid.UUID) ([]asteroid.SupervisionResult, error)
func (*PostgresqlStore) GetSupervisionStatusesForChainExecution ¶
func (s *PostgresqlStore) GetSupervisionStatusesForChainExecution(ctx context.Context, executionId uuid.UUID) ([]asteroid.SupervisionStatus, error)
func (*PostgresqlStore) GetSupervisionStatusesForRequest ¶
func (s *PostgresqlStore) GetSupervisionStatusesForRequest(ctx context.Context, requestId uuid.UUID) ([]asteroid.SupervisionStatus, error)
func (*PostgresqlStore) GetSupervisor ¶
func (s *PostgresqlStore) GetSupervisor(ctx context.Context, id uuid.UUID) (*asteroid.Supervisor, error)
func (*PostgresqlStore) GetSupervisorChain ¶
func (s *PostgresqlStore) GetSupervisorChain(ctx context.Context, chainId uuid.UUID) (*asteroid.SupervisorChain, error)
func (*PostgresqlStore) GetSupervisorChains ¶
func (s *PostgresqlStore) GetSupervisorChains(ctx context.Context, toolId uuid.UUID) ([]asteroid.SupervisorChain, error)
func (*PostgresqlStore) GetSupervisorFromValues ¶
func (s *PostgresqlStore) GetSupervisorFromValues( ctx context.Context, code string, name string, desc string, t asteroid.SupervisorType, attributes map[string]interface{}, ) (*asteroid.Supervisor, error)
func (*PostgresqlStore) GetSupervisors ¶
func (s *PostgresqlStore) GetSupervisors(ctx context.Context, projectId uuid.UUID) ([]asteroid.Supervisor, error)
func (*PostgresqlStore) GetTaskRuns ¶
func (*PostgresqlStore) GetToolCall ¶
func (s *PostgresqlStore) GetToolCall(ctx context.Context, id uuid.UUID) (*asteroid.AsteroidToolCall, error)
func (*PostgresqlStore) GetToolCallFromCallId ¶
func (s *PostgresqlStore) GetToolCallFromCallId(ctx context.Context, id string) (*asteroid.AsteroidToolCall, error)
func (*PostgresqlStore) GetToolFromNameAndRunId ¶
func (*PostgresqlStore) GetToolFromValues ¶
func (*PostgresqlStore) UpdateMessage ¶
func (s *PostgresqlStore) UpdateMessage(ctx context.Context, id uuid.UUID, message asteroid.AsteroidMessage) error
func (*PostgresqlStore) UpdateRunResult ¶
func (*PostgresqlStore) UpdateRunStatus ¶
Click to show internal directories.
Click to hide internal directories.