func()

in chatcompletion.go [1540:1553]


func (u ChatCompletionMessageParamUnion) GetName() *string {
	if vt := u.OfDeveloper; vt != nil && vt.Name.IsPresent() {
		return &vt.Name.Value
	} else if vt := u.OfSystem; vt != nil && vt.Name.IsPresent() {
		return &vt.Name.Value
	} else if vt := u.OfUser; vt != nil && vt.Name.IsPresent() {
		return &vt.Name.Value
	} else if vt := u.OfAssistant; vt != nil && vt.Name.IsPresent() {
		return &vt.Name.Value
	} else if vt := u.OfFunction; vt != nil {
		return (*string)(&vt.Name)
	}
	return nil
}