package assistant // Get get the assistant by id func Get(id string) (*Assistant, error) { return LoadStore(id) } // GetByConnector get the assistant by connector func GetByConnector(connector string, name string) (*Assistant, error) { id := "connector:" + connector assistant, exists := loaded.Get(id) if exists { return assistant, nil } data := map[string]interface{}{ "assistant_id": id, "connector": connector, "description": "Default assistant for " + connector, "name": name, "type": "assistant", } assistant, err := loadMap(data) if err != nil { return nil, err } loaded.Put(assistant) return assistant, nil } // Init init the assistant // Choose the connector and initialize the assistant func (ast *Assistant) initialize() error { return nil }