Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit a356a2e

Browse files
committed
Add NoArgsConstructor to ChatFunction
1 parent fee68ba commit a356a2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/src/main/java/com/theokanning/openai/completion/chat/ChatFunction.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
import com.fasterxml.jackson.annotation.JsonIgnore;
44
import com.fasterxml.jackson.annotation.JsonProperty;
55
import lombok.Data;
6+
import lombok.NoArgsConstructor;
67
import lombok.NonNull;
78

89
import java.util.function.Function;
910

1011
@Data
12+
@NoArgsConstructor
1113
public class ChatFunction {
1214

1315
@NonNull
@@ -46,7 +48,8 @@ public <T> Builder executor(Class<T> requestClass, Function<T, Object> executor)
4648
}
4749

4850
public ChatFunction build() {
49-
ChatFunction chatFunction = new ChatFunction(name);
51+
ChatFunction chatFunction = new ChatFunction();
52+
chatFunction.setName(name);
5053
chatFunction.setDescription(description);
5154
chatFunction.setParametersClass(parameters);
5255
chatFunction.setExecutor(executor);

0 commit comments

Comments
 (0)