mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 02:03:42 +08:00
feat: finish adding chat role to user function
This commit is contained in:
@@ -36,7 +36,7 @@ func CopyObject(src interface{}, dst interface{}) error {
|
||||
pType := reflect.New(value.Type())
|
||||
v2 := pType.Interface()
|
||||
err := json.Unmarshal([]byte(v.String()), &v2)
|
||||
if err == nil {
|
||||
if err == nil && v2 != nil {
|
||||
value.Set(reflect.ValueOf(v2).Elem())
|
||||
}
|
||||
// map, struct, slice to string
|
||||
|
||||
Reference in New Issue
Block a user