package compapi

/*
	目前看FastgptClient=StdClient,相当于别名
	以后再分或合并再议
*/

type FastgptClient struct {
	StdClient
}

// 向Client.getClientActFace工厂方法注册(包含默认)
func init() {
	// Define the builder once
	builder := func(c *Client) (clientActionFace, error) {
		return &FastgptClient{StdClient: StdClient{Client: c}}, nil
	}

	// Register it under its specific name "fastgpt"
	err := RegisterClient("fastgpt", builder)
	if err != nil {
		//panic(fmt.Sprintf("Failed to register client type 'fastgpt': %v", err))
	}

	// **** Also register it as the DEFAULT client ****
	err = RegisterDefaultClient("fastgpt", builder)
	if err != nil {
		// This might happen if another client also tried to register as default
		//panic(fmt.Sprintf("Failed to register 'fastgpt' as default client: %v", err))
	}
}
