Skip to content

Commit

Permalink
removing constructors from records
Browse files Browse the repository at this point in the history
  • Loading branch information
ldaugusto committed Jan 8, 2025
1 parent 59a0e4f commit 6a234c6
Showing 1 changed file with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@ public record LlmAsJudgeCode(
@JsonView({View.Public.class, View.Write.class}) @NotNull List<LlmAsJudgeMessage> messages,
@JsonView({View.Public.class, View.Write.class}) @NotNull Map<String, String> variables,
@JsonView({View.Public.class, View.Write.class}) @NotNull List<LlmAsJudgeOutputSchema> schema){

@ConstructorProperties({"model", "messages", "variables", "schema"})
public LlmAsJudgeCode(@NotNull LlmAsJudgeModelParameters model, @NotNull List<LlmAsJudgeMessage> messages,
@NotNull Map<String, String> variables, @NotNull List<LlmAsJudgeOutputSchema> schema) {
this.model = model;
this.messages = messages;
this.variables = variables;
this.schema = schema;
}
}

@Builder(toBuilder = true)
Expand All @@ -55,12 +46,6 @@ public record LlmAsJudgeMessage(
@JsonView( {
View.Public.class, View.Write.class}) @NotNull ChatMessageType role,
@JsonView({View.Public.class, View.Write.class}) @NotNull String content){

@ConstructorProperties({"role", "content"})
public LlmAsJudgeMessage(@NotNull ChatMessageType role, @NotNull String content) {
this.role = role;
this.content = content;
}
}

@Builder(toBuilder = true)
Expand All @@ -70,14 +55,6 @@ public record LlmAsJudgeOutputSchema(
View.Public.class, View.Write.class}) @NotNull String name,
@JsonView({View.Public.class, View.Write.class}) @NotNull LlmAsJudgeOutputSchemaType type,
@JsonView({View.Public.class, View.Write.class}) @NotNull String description){

@ConstructorProperties({"name", "type", "description"})
public LlmAsJudgeOutputSchema(@NotNull String name, @NotNull LlmAsJudgeOutputSchemaType type,
@NotNull String description) {
this.name = name;
this.description = description;
this.type = type;
}
}

@Builder(toBuilder = true)
Expand All @@ -86,12 +63,6 @@ public record LlmAsJudgeModelParameters(
@JsonView( {
View.Public.class, View.Write.class}) @NotNull String name,
@JsonView({View.Public.class, View.Write.class}) @NotNull Double temperature){

@ConstructorProperties({"name", "temperature"})
public LlmAsJudgeModelParameters(@NotNull String name, @NotNull Double temperature) {
this.name = name;
this.temperature = temperature;
}
}

@ConstructorProperties({"id", "projectId", "name", "samplingRate", "code", "createdAt", "createdBy",
Expand Down

0 comments on commit 6a234c6

Please sign in to comment.