....
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user