-
Notifications
You must be signed in to change notification settings - Fork 58
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
1 parent
69660a4
commit 3107cb9
Showing
4 changed files
with
61 additions
and
233 deletions.
There are no files selected for viewing
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
133 changes: 21 additions & 112 deletions
133
...boot-starter/src/main/java/dev/langchain4j/googleaigemini/spring/ChatModelProperties.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 |
---|---|---|
@@ -1,112 +1,21 @@ | ||
package dev.langchain4j.googleaigemini.spring; | ||
|
||
import dev.langchain4j.model.chat.request.ResponseFormat; | ||
import org.springframework.boot.context.properties.NestedConfigurationProperty; | ||
|
||
import java.time.Duration; | ||
|
||
public class ChatModelProperties { | ||
|
||
private String modelName; | ||
private Double temperature; | ||
private Double topP; | ||
private Integer topK; | ||
private Integer maxOutputTokens; | ||
private ResponseFormat responseFormat; | ||
private Boolean logRequestsAndResponses; | ||
private Integer maxRetries; | ||
private Duration timeout; | ||
|
||
private GeminiSafetySetting safetySetting; | ||
|
||
private GeminiFunctionCallingConfig functionCallingConfig; | ||
|
||
public Integer getMaxRetries() { | ||
return maxRetries; | ||
} | ||
|
||
public void setMaxRetries(Integer maxRetries) { | ||
this.maxRetries = maxRetries; | ||
} | ||
|
||
public Duration getTimeout() { | ||
return timeout; | ||
} | ||
|
||
public void setTimeout(Duration timeout) { | ||
this.timeout = timeout; | ||
} | ||
|
||
public ResponseFormat getResponseFormat() { | ||
return responseFormat; | ||
} | ||
|
||
public void setResponseFormat(ResponseFormat responseFormat) { | ||
this.responseFormat = responseFormat; | ||
} | ||
|
||
public String getModelName() { | ||
return modelName; | ||
} | ||
|
||
public void setModelName(String modelName) { | ||
this.modelName = modelName; | ||
} | ||
|
||
public Double getTemperature() { | ||
return temperature; | ||
} | ||
|
||
public void setTemperature(Double temperature) { | ||
this.temperature = temperature; | ||
} | ||
|
||
public Double getTopP() { | ||
return topP; | ||
} | ||
|
||
public void setTopP(Double topP) { | ||
this.topP = topP; | ||
} | ||
|
||
public Integer getTopK() { | ||
return topK; | ||
} | ||
|
||
public void setTopK(Integer topK) { | ||
this.topK = topK; | ||
} | ||
|
||
public Boolean getLogRequestsAndResponses() { | ||
return logRequestsAndResponses; | ||
} | ||
|
||
public void setLogRequestsAndResponses(Boolean logRequestsAndResponses) { | ||
this.logRequestsAndResponses = logRequestsAndResponses; | ||
} | ||
|
||
public GeminiSafetySetting getSafetySetting() { | ||
return safetySetting; | ||
} | ||
|
||
public void setSafetySetting(GeminiSafetySetting safetySetting) { | ||
this.safetySetting = safetySetting; | ||
} | ||
|
||
public GeminiFunctionCallingConfig getFunctionCallingConfig() { | ||
return functionCallingConfig; | ||
} | ||
|
||
public void setFunctionCallingConfig(GeminiFunctionCallingConfig functionCallingConfig) { | ||
this.functionCallingConfig = functionCallingConfig; | ||
} | ||
|
||
public Integer getMaxOutputTokens() { | ||
return maxOutputTokens; | ||
} | ||
|
||
public void setMaxOutputTokens(Integer maxOutputTokens) { | ||
this.maxOutputTokens = maxOutputTokens; | ||
} | ||
|
||
} | ||
package dev.langchain4j.googleaigemini.spring; | ||
|
||
import dev.langchain4j.model.chat.request.ResponseFormat; | ||
|
||
import java.time.Duration; | ||
|
||
|
||
public record ChatModelProperties( | ||
String modelName, | ||
Double temperature, | ||
Double topP, | ||
Integer topK, | ||
Integer maxOutputTokens, | ||
ResponseFormat responseFormat, | ||
Boolean logRequestsAndResponses, | ||
Integer maxRetries, | ||
Duration timeout, | ||
GeminiSafetySetting safetySetting, | ||
GeminiFunctionCallingConfig functionCallingConfig | ||
) { | ||
} |
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
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