static model load
All checks were successful
build-and-deploy / build-deploy (push) Successful in 36s

This commit is contained in:
androidlover5842
2026-02-01 00:50:21 +05:30
parent aab9b02659
commit f51a1a80e8
2 changed files with 7 additions and 4 deletions

View File

@@ -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,

View File

@@ -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