Skip to content

Commit

Permalink
fix: add lost messages for Azure
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 31, 2023
1 parent 2fcab1c commit 468a5ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -173,6 +173,7 @@ class AzureOpenAIProvider(val project: Project) : LLMProvider {
ObjectMapper().readValue(sse!!.data, ChatCompletionResult::class.java)
val completion = result.choices[0].message
if (completion != null && completion.content != null) {
output += completion.content
trySend(completion.content)
}
}
Expand Down
Expand Up @@ -52,8 +52,7 @@ class CustomLLMProvider(val project: Project) : LLMProvider {

private var client = OkHttpClient()
private val timeout = Duration.ofSeconds(600)
private val messages: MutableList<Message> = ArrayList()

private val messages: MutableList<Message> = mutableListOf()
private val logger = logger<CustomLLMProvider>()

override fun clearMessage() {
Expand Down Expand Up @@ -139,6 +138,7 @@ class CustomLLMProvider(val project: Project) : LLMProvider {
}
}
}

close()
}
awaitClose()
Expand Down

0 comments on commit 468a5ce

Please sign in to comment.