Skip to content

Commit

Permalink
Merge main into sweep/add-sweep-config
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Jan 19, 2024
2 parents 46d7d07 + b19a6f8 commit fb175da
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ object LLMServiceClient {

inline fun <reified T : Any> run(task: String, request: T): JsonNode = runBlocking {
val response: String = try {
client.post("${llmServiceUrl}/$task") {
contentType(ContentType.Application.Json)
setBody(jsonMapper.writeValueAsString(request))
}.body()
async {
client.post("${llmServiceUrl}/$task") {
contentType(ContentType.Application.Json)
setBody(jsonMapper.writeValueAsString(request))
}
}.await().body()
} catch (e: Exception) {
throw LLMClientException()
}
Expand Down

0 comments on commit fb175da

Please sign in to comment.