API 1.2.4.2 v1.2.4 openai controller utf8
This commit is contained in:
parent
db0c951e00
commit
5e0c1df5eb
@ -45,7 +45,7 @@ class OpenAIController() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@OptIn(BetaOpenAI::class, DelicateCoroutinesApi::class)
|
@OptIn(BetaOpenAI::class, DelicateCoroutinesApi::class)
|
||||||
@PostMapping("/openai/chat_completion")
|
@PostMapping("/openai/chat_completion", produces = [org.springframework.http.MediaType.APPLICATION_JSON_VALUE + ";charset=UTF-8"])
|
||||||
fun getOpenAIChatCompletion(@RequestBody openai: OpenAIChat, @Value("\${openai.key}") openaiKey: String, ) : String {
|
fun getOpenAIChatCompletion(@RequestBody openai: OpenAIChat, @Value("\${openai.key}") openaiKey: String, ) : String {
|
||||||
var result: String
|
var result: String
|
||||||
val openAIService = OpenAIService(openaiKey, openai.modelName, openai.temperature)
|
val openAIService = OpenAIService(openaiKey, openai.modelName, openai.temperature)
|
||||||
|
Loading…
Reference in New Issue
Block a user