MCPcopy Create free account
hub / github.com/QuantumNous/new-api / GenerateSystemTaskID

Function GenerateSystemTaskID

model/system_task.go:84–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82}
83
84func GenerateSystemTaskID() (string, error) {
85 key, err := common.GenerateRandomCharsKey(32)
86 if err != nil {
87 return "", err
88 }
89 return "systask_" + key, nil
90}
91
92func CreateSystemTask(taskType string, payload any, state any) (*SystemTask, error) {
93 taskID, err := GenerateSystemTaskID()

Calls 1

GenerateRandomCharsKeyFunction · 0.92