static model load
All checks were successful
build-and-deploy / build-deploy (push) Successful in 36s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 36s
This commit is contained in:
@@ -23,7 +23,9 @@ class LlamaClient(
|
||||
@Value("\${ai.llama.repeatPenalty:1.0}")
|
||||
private val repeatPenalty: Double,
|
||||
@Value("\${ai.llama.topK:40}")
|
||||
private val topK: Int
|
||||
private val topK: Int,
|
||||
@Value("\${ai.llama.model}")
|
||||
private val model: String
|
||||
) {
|
||||
private val systemPrompt =
|
||||
"Read extremely carefully. Look only at visible text. " +
|
||||
@@ -33,7 +35,7 @@ class LlamaClient(
|
||||
|
||||
fun ask(imageUrl: String, question: String): String {
|
||||
val payload = mapOf(
|
||||
"model" to "qwen",
|
||||
"model" to model,
|
||||
"temperature" to temperature,
|
||||
"top_p" to topP,
|
||||
"min_p" to minP,
|
||||
@@ -58,7 +60,7 @@ class LlamaClient(
|
||||
|
||||
fun askWithOcr(imageUrl: String, ocrText: String, question: String): String {
|
||||
val payload = mapOf(
|
||||
"model" to "qwen",
|
||||
"model" to model,
|
||||
"temperature" to temperature,
|
||||
"top_p" to topP,
|
||||
"min_p" to minP,
|
||||
@@ -86,7 +88,7 @@ class LlamaClient(
|
||||
|
||||
fun askText(content: String, question: String): String {
|
||||
val payload = mapOf(
|
||||
"model" to "qwen",
|
||||
"model" to model,
|
||||
"temperature" to temperature,
|
||||
"top_p" to topP,
|
||||
"min_p" to minP,
|
||||
|
||||
@@ -28,6 +28,7 @@ ai.llama.topP=0.8
|
||||
ai.llama.minP=0.2
|
||||
ai.llama.repeatPenalty=1.0
|
||||
ai.llama.topK=40
|
||||
ai.llama.model=/workspace/models/InternVL2_5-8B-AWQ
|
||||
ocr.paddle.enabled=true
|
||||
ocr.paddle.baseUrl=https://ocr.hoteltrisolaris.in/
|
||||
ocr.paddle.minScore=0.9
|
||||
|
||||
Reference in New Issue
Block a user