-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
interweb-server/src/main/java/de/l3s/interweb/server/features/requests/ChatRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package de.l3s.interweb.server.features.requests; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
|
||
import de.l3s.interweb.server.features.user.ApiKey; | ||
|
||
import de.l3s.interweb.server.features.user.User; | ||
|
||
import jakarta.persistence.*; | ||
import jakarta.validation.constraints.NotNull; | ||
|
||
import org.hibernate.annotations.CreationTimestamp; | ||
|
||
import java.time.Instant; | ||
|
||
public class ChatRequest { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
public Long id; | ||
|
||
@NotNull | ||
@JsonIgnore | ||
@ManyToOne(optional = false, fetch = FetchType.EAGER) | ||
public User user; | ||
|
||
@JsonIgnore | ||
@ManyToOne(optional = false, fetch = FetchType.LAZY) | ||
public ApiKey apikey; | ||
|
||
@NotNull | ||
public String model; | ||
|
||
@NotNull | ||
@Column(name = "input_tokens") | ||
public Integer inputTokens = 0; | ||
|
||
@NotNull | ||
@Column(name = "output_tokens") | ||
public Integer outputTokens = 0; | ||
|
||
@NotNull | ||
@Column(name = "est_cost") | ||
public Double estimatedCost = 0d; | ||
|
||
@CreationTimestamp | ||
public Instant created; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
interweb.admin.email= | ||
interweb.auto-approve.pattern=[email protected]$ | ||
|
||
quarkus.http.port=8080 | ||
quarkus.http.cors=true | ||
quarkus.http.cors.origins=/.*/ | ||
quarkus.http.cors.access-control-allow-credentials=true | ||
|
||
quarkus.ssl.native=true | ||
quarkus.http.port=8080 | ||
|
||
quarkus.analytics.disabled=true | ||
quarkus.log.level=INFO | ||
|
||
quarkus.cache.caffeine.initial-capacity=100 | ||
|