This commit is contained in:
2026-03-30 13:41:26 +09:00
parent d552584446
commit 5b70c7805a
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -332,7 +332,7 @@ object RagService {
//// println(response)
// return response.aiMessage().text()
// }
private const val LLM_API_URL = "http://127.0.0.1:8080/v1/chat/completions"
private fun LLM_API_URL() = "http://127.0.0.1:$LLM_PORT/v1/chat/completions"
private suspend fun callLlamaWithSchema(prompt: String): String {
val jsonMediaType = "application/json; charset=utf-8".toMediaType()
@@ -365,7 +365,7 @@ object RagService {
}.toString()
println("requestBodyJson =>> $requestBodyJson")
val request = Request.Builder()
.url(LLM_API_URL)
.url(LLM_API_URL())
.post(requestBodyJson.toRequestBody(jsonMediaType))
.build()